Wrong Historical Data on 9:20AM every day

APPU
I am running a job every 5 minutes to retrieve historical data for the previous 5-minute interval. However, every day at 9:20 AM, when I run the job to get the Nifty open candle data, it always returns incorrect information.

Example on 02/12/2024:
I use the following API call:

historicalData = kiteConnect.getHistoricalData(from, to, id, time, false, true);
from: 09:15:00
to: 09:19:58
time: 5 minutes

Retrieved Values:
Open: 24149.55
Close: 24036.25
Date/Time: Mon Dec 02 09:15:00 IST 2024

Kite Platform Values:
Open: 24140.97
Close: 24037.40
Date/Time: Mon Dec 02 09:15:00 IST 2024

Could you please explain why this discrepancy occurs? What time frame should I use to ensure accurate retrieval of the first 5-minute candle data?

Regards
Appu
  • sujith
    The historical data API is provided for backtesting purposes only. For live market strategies, we suggest generating candles at your end using the live market dat provided via Websocket API.
    You may get started here.
Sign In or Register to comment.