Hi,
I’m currently developing a connector for futures.
To test my implementation I’m using the testnet, I can successfully make API calls and get responses.
I’m currently implementing the websocket part and I’m facing an issue with orders data streams.
I’m using the following endpoints https://testnet.binancefuture.com and wss://stream.binancefuture.com/ws
When placing a limit order I can see the event ORDER_TRADE_UPDATE being triggered with order_status = ‘NEW’, however, when the order is filled, I don’t receive any other event with order_status = ‘FILLED’. I do receive the ACCOUNT_UPDATE event.
Example here:
[05-23-2022_19-09-21] [MESSAGE] {"e":"ORDER_TRADE_UPDATE","T":1653325761146,"E":1653325761149,"o":{"s":"BTCUSDT","c":"4s5ZxCWqZDs6b1SVP0cK4R","S":"SELL","o":"LIMIT","f":"GTC","q":"0.010","p":"30107.70","ap":"0","sp":"0","x":"NEW","X":"NEW","i":3041760179,"l":"0","z":"0","L":"0","T":1653325761146,"t":0,"b":"0","a":"608.30390","m":false,"R":false,"wt":"CONTRACT_PRICE","ot":"LIMIT","ps":"BOTH","cp":false,"rp":"0","pP":false,"si":0,"ss":0}}
[05-23-2022_19-09-27] [MESSAGE] {"e":"ACCOUNT_UPDATE","T":1653325766936,"E":1653325766939,"a":{"B":[{"a":"USDT","wb":"2967.60205574","cw":"2967.60205574","bc":"0"}],"P":[{"s":"BTCUSDT","pa":"-0.010","ep":"30107.70000","cr":"-48.55449996","up":"-0.06003087","mt":"cross","iw":"0","ps":"BOTH","ma":"USDT"}],"m":"ORDER"}}
If I try a market order, I have the same result, as I can see ORDER_TRADE_UPDATE with order_status = ‘NEW’ but I never see either ORDER_TRADE_UPDATE event with order_status = FILLED.
Example here:
[05-23-2022_19-28-10] [MESSAGE] {"e":"ORDER_TRADE_UPDATE","T":1653326889990,"E":1653326889993,"o":{"s":"BTCUSDT","c":"jrJIKjkL6GaQ1ZpvcOk1hj","S":"BUY","o":"MARKET","f":"GTC","q":"0.010","p":"0","ap":"0","sp":"0","x":"NEW","X":"NEW","i":3041763941,"l":"0","z":"0","L":"0","T":1653326889990,"t":0,"b":"0","a":"0","m":false,"R":false,"wt":"CONTRACT_PRICE","ot":"MARKET","ps":"BOTH","cp":false,"rp":"0","pP":false,"si":0,"ss":0}}
[05-23-2022_19-28-10] [MESSAGE] {"e":"ACCOUNT_UPDATE","T":1653326889990,"E":1653326889993,"a":{"B":[{"a":"USDT","wb":"2957.27333734","cw":"2957.27333734","bc":"0"}],"P":[{"s":"BTCUSDT","pa":"0.010","ep":"30103.60000","cr":"-55.02949996","up":"0.01464680","mt":"cross","iw":"0","ps":"BOTH","ma":"USDT"}],"m":"ORDER"}}
If I manually close my position I can see the ACCOUNT_UPDATE event being triggered.
Does anybody already faced similar issues with data streams using the testnet endpoint ?
Thanks in advance for your support.