Relative Content

Tag Archive for websocketpython-binance

Binance Socket Manager not returning any data anymore

from binance.client import Client from binance.streams import BinanceSocketManager import json # API Setup with open(‘/Users/anon/Desktop/LOB-bot/LOB/api.json’, ‘r’) as file: api_data = json.load(file) api_key = api_data[‘API_KEY’] api_secret = api_data[‘API_SECRET’] client = Client(api_key, api_secret, testnet=True) bsm = BinanceSocketManager(client) symbol = ‘WIFUSDT’ async with bsm.futures_multiplex_socket(streams=[f”{symbol.lower()}@depth20@100ms”, f”{symbol.lower()}@kline_4h”]) as stream: while True: res = await stream.recv() print(res) Hi, I’ve been running […]