Detecting disconnection

Hi,

I’m using Python and websocket-client library. I’m using blocking call in a thread. After a while if there’s no data Binance disconnects me however ws.recv() doesn’t return anything (no error raised).

What’s the best way to get connected all the time? If disconnected, reconnect and etc.?

Thank you very much

We don’t look into programming questions, but you can try looking into this connector’s source code as demo for your own project: https://github.com/binance/binance-connector-python
It doesn’t support futures endpoints.