Hi, I’m attempting to fetch data in bulk to be efficient. When i run the code, it’s not producing any output and it seems to just be “stuck”. Please help
import websocket
import json
from binance.streams import ThreadedWebsocketManager
def handle_socket_message(msg):
print(f"message type: {msg['e']}")
print(msg)
if __name__ == "__main__":
websocket.enableTrace(True)
twm = ThreadedWebsocketManager(api_key=api_key, api_secret=api_secret, testnet=True)
twm.start_multiplex_socket(callback=handle_socket_message, streams=["luna2usdt@depth20@100ms", "luna2usdt@kline_4h", "luna2usdt@trade"])
twm.join()