Hi, I’ve been running this code as part of my trading strategy on a server.
I’ve integrated error and rate limit handling.
I’m wondering as to why it has stopped returning any data whatsover. Have my api been banned ?
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)