Websocket connection lost too many times
I developed a binary bot to schedule some trades at specific times during the day, but every day when I check the bot logs I found out that about 10% of the trades failed to execute on binary.com
After analyzing I figure out that the problem is because the WebSocket connection was "PREMATURELY CLOSED" with code 1001 - going away.
Sometimes I got the message "Unexpected end of stream" and other times it's "CloudFlare WebSocket proxy restarting".
My bot sends a heartbeat ping message every 10 seconds.
Does anyone here experienced this situation and know how to deal with that?
Thanks for the help!