Hi, I am using python-binance package, connected to Binance’s test Websocket:
Sometimes, the price (“p” from the json response) is below 1 usdt, when a second before it is around 200, and the second after it returns to 200. This is really messing up my bot, I wonder if it is a bug in the testnet or is it something I am doing wrong?
I trigger order events (to https://testnet.binance.vision/api) whenever there is a a certain price % change from my last order, so when everything is ok it triggers once in a few minutes.
When I get suddenly a 99+% change (as I said, the websocket json response says price is bellow 1 usdt), it goes crazy and I get all of a sudden lots of price feeds from Testnet.
I read the price from on_message function, like this:
def onMessage(ws, message):
json_message = json.loads(message)
price = round(float(json_message[‘p’]),2)