Our great sponsors
-
unicorn-binance-websocket-api
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 easy, fast, flexible, robust and fully-featured way.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The solutions in this post are for keeping user data streams alive as far as I understand, and comments on this post recommends using Unicorn Binance Websockets because it handles reconnects. I tried but too complicated for me to use right now.
I've been using the Binance websocket and the python-binance wrapper to access it. I tested streaming the price of BTCUSDT from the aggTrade stream using this simple python code.