hitbtc-com / hitbtc-api

HitBTC API
GNU Lesser General Public License v3.0
324 stars 153 forks source link

WebSocket Read EOF #203

Closed fxsession closed 6 years ago

fxsession commented 6 years ago

Hi, I get "WebSocket Read EOF" message regularly in 1-2 hours after I setup a secure connection. why? Insecure connection working in parallel keeps alive.

fxsession commented 6 years ago

No response. Great support!

fxsession commented 6 years ago

The number of disconnects increased significantly. 1006 (EOF) and 502(Bad Gateway) occur almost every 2-3 minutes. It's impossible to trade. Are you serious when you declare on your start page "HitBTC is delivering the most reliable, fast and powerful platform solution on the market."?

WillHern91 commented 6 years ago

Same issue here. Both my Python and C++ systems had been running ok up until a few weeks ago. They began disconnecting every couple of hours, but now it is happening every few minutes.

fxsession commented 6 years ago

Support has replied recently that they had launched a new update for API. I noticed that the amount of disconnecting reduced a little bit but still they occur every 5-10 minutes which is not acceptable. Attaching snapshot of wireshark dump which clearly shows that the server initiates disconnecting. tcptrace-fin

mellertson commented 6 years ago

Same issue here. I finally re-wrote a websocket connector which automatically reconnects. It's only a workaround, and not a solution, but it's the best I found at this point.

fxsession commented 6 years ago

I did the same thing but it's far from HFT when you need to reconnect... temporary switched to binance though fees are higher.

hitbtc-com commented 6 years ago

You application should subscribe once, and fetch data from socket fast. If you try subscribe unsubscribe and again, then your requests will be rate limited. If you can't fetch fast data from the socket, then your connection will be closed. If you too often was slow, then your IP will be banned for an hour.