Futures API, user data stream expired event occurs each 5 minutes to me. And it is not stable: in some days all is ok, but some times I catch that event every 5 minutes within a few hours. What could be the reason?
Sorry to hear that, do you mind sharing which base url did you work with?
thanks
I’m working with wss://fstream.binance.com - it is from official api docs.
I also have this problem. My same code works fine on the spot API. However on futures (wss://fstream.binance.com/) I get disconnected every ~8mins. I either get connection reset by peer
or close 1006 (abnormal closure): unexpected EOF
. I am sending regular pings and responding to your pings.
please have a try with this demo, see if it disconnect within 10 minutes. You will need to check the websocket connection from a different region/server if it disconnected in short time.
I do not seem to get disconnected from this when connected to the production futures depth stream. Also, I get disconnected from both an AWS EC2 instance in the eu-west-1 region and from my laptop in the UK.
I would suggest to investigate your app subscribing the websocket.
The demo from above is connecting to the same server as yours.
I don’t have this issue on Spot API. Are there any differences between Spot and Futures that I should be aware of?
I think there is no difference, also you can provide the listenkey in the demo site for testing.
There is definitely something very odd going on in the last 24 hours. My app has been running smoothly for months (almost a year), and while disconnection happen, that’s happening on a 5min / 10min basis. Also Spot and Margin subscriptions have no issues, all running in the same app.
which stream and what’s the issue?
@dino the stream reported in that issue (Futures), and the same issue (the server breaks the connection). Yet I see that the amount of disconnection has drastically reduced within the last 12 hours. I still had one 3 hours ago but that’s nowhere near close how it was just one day ago. I suppose the issue has been / is being resolved?
Yes , future private ws not be very stable, I receive Expired event after running about 7 hours. Some one know this?