From 876eb901906ce261de0d36f05c00a0e48a6fffbd Mon Sep 17 00:00:00 2001 From: aazhou Date: Mon, 17 Jul 2023 22:19:21 +0800 Subject: [PATCH] try --- bn.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bn.py b/bn.py index fd0e0af..3c81a8e 100644 --- a/bn.py +++ b/bn.py @@ -9,8 +9,11 @@ def klines(symbol, interval, limit=1000): return lines def ticker_price(symbol): - prices = cm.ticker_price(symbol) - return prices[0]['price'] if len(prices)>0 else 0 + try: + prices = cm.ticker_price(symbol) + return prices[0]['price'] if len(prices)>0 else 0 + except: + return 0 # Get Symbols def symbols():