Browse Source

一些细微调整。

skyffire 1 year ago
parent
commit
39ce5180d6
2 changed files with 3 additions and 3 deletions
  1. 0 1
      kappa/data_processing.py
  2. 3 2
      kappa/ws_client.py

+ 0 - 1
kappa/data_processing.py

@@ -1,6 +1,5 @@
 import json
 import pandas as pd
-import queue
 import threading
 from collections import deque
 from scipy.integrate import trapz

+ 3 - 2
kappa/ws_client.py

@@ -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                 # 重新抛出错误