Keep Binance futures wss alive.
But it closes after some time. How do I keep it always running? I thought it should work by restarting it in close but its not working..
1 Answer 1.
You may need to periodically ping (or binance-markkinat send a pong in response to the ping) the server to indicate the connection is still alive.
Understand פארוואס בינאַנסע נישט אין ניו יארק that this is at a connection level rather than the application level (i.e. this is not part of the stream path given by σάρωση κωδικού binance qr
, lèirmheas staking binance but at the websocket level itself)
The code will depend on your websocket framework of choice: some may automatically process the ping and emit a pong, 平衡保證金審查 but it may not be happening in you framework.
Basically, on receiving a Ping from the server (check you event handlers to identify this) you will need to send back a "Pong", jambatan binance potentially with the same payload that was send in the ping frame.