websocket data differs from live spot market data


I’m using Python and the binance-connector==3.5.1 package to get live data of ETH/BTC in 1 minute resolution through a SpotWebsocketStreamClient object.
The results I’m publishing locally in a redis channel where a client is getting them and stores them in a SQLite DB.
While running the tools I opened in parallel my Binance account in a browser showing the same symbol in the chart view.
What I see is, that the values received through the websocket stream are similar, but not identical.
I will try to provide a screen shot to this topic, but before I’m going to describe the differences.
I’m located in a Germany, so the timezone is UTC+1. I haven’t fount a configuration option in the chart to provide UTC timestamps. My tooling is dumping the reception time as UTC timestamp. In case I will be able to upload the screenshot have in mind a 1 hour difference in the time displayed.
The values of open,high,low,close are differing sometimes in the last digit.
Is this a known limitation?

the difference shown here is at 2024-02-06 14:59 UTC. The websocket stream provided
open=0.0545, high=0.05446, low=0.05445, close=0.05446
where the chart shows
open=0.0545, high=0.05447, low=0.05445, close=0.05447
I have seen also bigger differences than 0.0001
Also the volume differs, but in this screenshot It is not listed. To be honest, I don’t know how I got in between also volume counts displayed.

Have you tried to compare a closed kline?

I noticed, that the precission of the data received through websocket is 5 digits where the data downloadable from binance vision has a precission of 8 digits. Maybe the WbSocket Interface provides them rounded to 5 digits and I was wrong with my statement that I have seen bigger differences of 0.0001 digits between the chart data on Binance and the WS data

I would suggest you to sync with binance server time, so execute the real time fetching of (as @dino already said) the just closed official klines, at 1 minute time-mark or according to your needs.

Hope this can help.