websocket Spot response with multiple subscribers - Error on timestamp

Hello,

I’m creating multiple service, one for each symbol and inside i have one web socket with this subscribers,
image

The web socket response after a candle has already closed does not seem to be updating for the next close.


For example, in the attached image, we can see that it is already 19h31m and the candle time is still pointing to 19h15m.
The print is divided as follows, the response from the web socket and after the message is, current date - token - the timestamp - conversion from timestamp to date.

Can anyone help me understand why this happens?

For the last kline on your screenshot:

  • "E": 1690481985932 – 2023-07-27 18:19:45.932 UTC – kline generation time
  • "t": 1690481700000 – 2023-07-27 18:15:00.000 UTC – open time
  • "T": 1690482599999 – 2023-07-27 18:29:59.999 UTC – close time

Looks pretty consistent with 15-minute interval.

You’re processing it, as appears, on 18:32:08 UTC. So either your clock is running severely ahead by 12 minutes, or you’re processing the events with a 12-minute delay, or they get delivered with that delay.

if you look to the last line on my print, my current date is 19h32h08s and i’m using ‘t’ property from web socket, so i think should be 19h30m.
My clock is ok.
there is any away i check the delay from web socket?

The difference between "E" and your current time. That would be the delay between Binance servers and your computer. Maybe it starts small and then keeps growing with time?

i think the problem cold be in my script, because after receive the data i need to arranged. And i think the messages could be in a queue inside websocket.