Futures candle closing price different from chart

Hello,

I created a script that is continously getting a historical candle right after it closed.
When I started to calculate indicators I noticed, that a lot of times the closing price does not match with what I see on the website’s chart.

I dig a little deeper and found out that Open High Low matches for the candle and half of the time the closing time too, but sometimes the closing price differs by a few dollars for BTCUSDT.

I get the last candle data by setting the endtime for the candle and limiting it to only 1 candle.

I tried to take out the endtime and changing the limit to get the latest 10 candles and it spits out the same candle I was asking before.

I am checking the price on the original view of binance futures which should be the same as the API as I think. Since everything matches except the closing price I am looking at the right chart.

Does anybody has an idea what did I do wrong or there is something server side?

Edit: I put some example, but unfortunately it only lets me include one picture, so this is from yestreday, but shows the same (difference is not huge here, but I had a few candles with 4-5 dollar difference)

Hi. Thanks for validating the data with such a detailed view.
May I know how did you get the latest candle stick data? Does the same inconsistency happen to the second last candle stick data, too?
Take this 1 min data as example, it is possible to experience some inconsistent server time between client and the remote server so the data on server side was access before the whole 1 min time span ended. The return array does not indicate this as the close time is predefined and remained unchanged. The suggestion is either always ignore the latest candle stick or check and update that specific tuple when fetching the next one.

Thank you for your answer.

Unfortunately it does not matter if it is only the last or the second or the 10th candlestick.
I thought the same thing that is why I tried to test it out, but if I see a bad candle close It will keep giving me the wrong value even if I come back 5 minutes later.

This mornning I started the script (It fills up a list with a limit x candle request) then every minute it calls for only the last candle and the new candle was already off.

In this example you can see the links I used this morning with the result:
All of them is the same candle which differs in closing price from the chart.
I came back later with a limit 15 call and it gives back the same.

Edit:
I just thought about what if the chart is giving me wrong results and came back to refresh the page.
It refreshed the value to the correct one, so the problem is on that side.