A Python SDK by LUCIT to use the Binance Websocket API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, com-coin_futures, us, tr, dex/chain+testnet) in a simple, fast, flexible, robust and fully-featured way.
The library (and websockets in general) has the problem that data is lost during restart/downtime. To process this, I create two identical streams per binance account. I restart them every 25 minutes with a lag of 2 minutes relative to each other. But after the restart, the data does not come. Or do I not see them?
Judging by the logs, the first pair restarted at 19:42, the second - at 19:44. Everything is correct. But after that the logs went at 19:47...
The problem seems, that after stopping a userData stream UBWA is deleting the listenKey... We need to implement a solution for that, will do it in first januar week...
Version of this library.
1.47.0
Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.
Hardware?
VPS or other cloud hosting
Operating System?
Linux
Python version?
Python3.9
Installed packages
No response
Logging output
Processing method?
stream_buffer
Used endpoint?
binance.com-futures
Issue
The library (and websockets in general) has the problem that data is lost during restart/downtime. To process this, I create two identical streams per binance account. I restart them every 25 minutes with a lag of 2 minutes relative to each other. But after the restart, the data does not come. Or do I not see them? Judging by the logs, the first pair restarted at 19:42, the second - at 19:44. Everything is correct. But after that the logs went at 19:47...