Difference in the last traded price and close price

I have noticed a small difference between the last traded price of a 5 minutes time interval and close price of the candle of the same time interval.
I am using V3 websocket to fetch the LTPs of the instruments.
I have noticed this multiple times and in various instruments
one of the instance happened today
adaniports [NSE_EQ|INE742F01042] ltp: 1113.35 time: 2025-02-20 02:59:59.664
This is the LTP that I received for a 02:55 5minute candle
while the close price of the same candle on upstox charts is 1113.40
As per my understanding the last LTP of a time interval would make up for the close price of the candle of that Time interval.
Please do correct me if I am wrong

@Kautilya Weā€™ll check this and get back to you. Let us know if you have any additional details in the meantime.

1 Like

did you check the interval you are using like 1 min or 3 minute sometimes i have seen it gives a different value

@Pawan_46486477 Yes, I am creating the 5 mins candle using ltp and I am checking the same thing on upstox.
And I am observing this for multiple instruments

@shanmu Any updates here?

bro i checked today and the little difference in ltp is because may be the read write thing to excel if you are doing, what i did was i changed data to feet and make it write to excel in one shot like 0.01 seconds for feed and writing to excel every 1 seconds i saw the ltp is working flawlessly, see no matter how mcuh you try to match there will be few minor seconds up and down as the data transmit from exchange to broker then to us

just shared my thoughts, correct me if i am wrong