sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
6.01k stars 2.2k forks source link

Binance is upgrading futures websocket #1399

Closed tsunamilx closed 7 months ago

tsunamilx commented 7 months ago

Binance just announced that they are upgrading futures websocket: https://binance-docs.github.io/apidocs/futures/en/#change-log

Binance Future is doing Websocket Service upgrade and the upgrade impacts the following:

Before upgrade:

The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited pong frames are allowed.

After upgrade:

Websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. When you receive a ping, you must send a pong with a copy of ping's payload as soon as possible. Unsolicited pong frames are allowed, but will not prevent disconnection. It is recommended that the payload for these pong frames are empty.

Will this affect the current version (1.0.19)?

tsunamilx commented 7 months ago

Reviewed some codes of this repo, didn't find anything about ping/pong handling, started panic, then searched online and turns out python websocket automatically handles that. So it should be just fine. Just to make sure I didn't misunderstand anything, can some also confirm for me? Much appreciated!

tsunamilx commented 7 months ago

So nobody actually cares