I'm new to coding and trading, but I'm learning both. 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. After some time, the stream just hangs and doesn't give any errors. The price hangs somewhere after 3 hours of run time The Binance docs say:
I'm not exactly sure how to send a ping, I tried searching for the issue online but didn't find anything helpful. 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. Do any of you guys know how I can fix this to get an uninterrupted stream for at least 24 hours using python-binance? Thanks in advance <3 P.S. The API is fine, I just want to figure out how to use websockets. [link] [comments] |
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments