I have a WebSocket connected to wss://stream.binance.com:9443/ws that subscribes to “!bookTicker” only. The application simply prints out 1 in 10000 events and does nothing else.
It works fine for a few minutes (sometimes up to an hour maybe), but eventually the data stops arriving. There is no error messages and the WebSocket remains in an open state. I do not receive error or close events.
I have a thing the periodically logs the socket state and it’s always ‘1’ (open) even after the market data stops being delivered.
I am using nodejs 14, and the WS library (v7.4.4).
I also log the ping messages that are received from the server, they also stop arriving.
I’m sure the WS library handles the ping/pong protocol, but I have also tried responding to the pings in the application code but it made no difference.
Why does the market data stop being delivered? And why is there no error message?