|
|
@@ -7,12 +7,13 @@ from logger_config import logger
|
|
|
from data_processing import on_message_depth, on_message_trade, stop_event
|
|
|
|
|
|
# Binance WebSocket API URL
|
|
|
-SYMBOL = "1000pepe" + "usdt"
|
|
|
+SYMBOL = "not" + "usdt"
|
|
|
SOCKET_TRADE = "wss://fstream.binance.com/stream?streams=" + SYMBOL + "@trade"
|
|
|
SOCKET_DEPTH = "wss://fstream.binance.com/stream?streams=" + SYMBOL + "@depth20@100ms"
|
|
|
|
|
|
|
|
|
-def on_error(_ws, error):
|
|
|
+def on_error(_ws, _error):
|
|
|
+ logger.error('捕获到一个异常。')
|
|
|
traceback.print_exc() # 打印完整的错误堆栈信息
|
|
|
# raise error # 重新抛出错误
|
|
|
|