Binance Futures Delay/Lag

Hi,

I’ve got a websocket connection subscribing for only user data. Most of the time, this works fine and I have no issues. However I have noticed that my websocket receives no data at time for periods longer than than my specified ping timeout (5 seconds).

As an example (that occured this morning - times are in UTC):
I receive some websocket data after placing and order (this will be the last know time I received websocket data).
[18:39:05.704] [INFO] [on_data ]

I place another order and receive a http response - but not a feed from the websocket
[18:39:19.221] [INFO] [request ] POST
[18:39:19.246] [INFO] [__check_response_errors]

After placing further orders and hitting my own limit, I shutdown.
[18:39:28.364] [ERROR]

I find it odd that neither occured:

  1. The websocket did not raise a 1011 error indicating that ping/pong timed out and/or disconnected
  2. No websocket data was received for a period of ~20 seconds despite orders being placed

Does anyone know what the problem is ?

There might be many causes to this issue.

  • Are you taking into consideration the lifetime of the listenKey?
  • Do you have other websocket connections open? Are they receiving data as expected?
  • Has this implementation worked previously and stopped working recently?
  • Yes I periodically “keep-alive” my key (every 30 seconds)
  • I did have other websockets subscribing for the price depth that was receiving data
  • This implementation worked previously and still currently works - its only occassionally I encounter this problem

One thing I forgot to mention - there were other times I noticed this had occurred. During those times, I received an account update via the websocket, but oddly not on the orders I had placed. It was as though there was some kind’ve lag in the matching engine or something