OHLC data is not maching between Historical Data and Zerodha chart

sukantary
Hi,

While I am fetching 15min historical data for NIFTY, API returns 25 candles. From those data I am calculating OHLC for the day and matching OHLC with Zerodha Kite Chart. But found some mismatch between them. I am attaching both the screenshots here. Please notice here, Historical data returns some different OHLC (please find the red marks on images) compared with Zerodha Kite Chart. I am worried that these difference will further generate wrong data. I am taking example for 03, Nov 2022. Could you please look into the issue.

  • Historical Data
  • Zerodha Kite Chart
  • sujith
    Are you fetching live market candle data or old data?
  • sukantary
    sukantary edited November 7
    I have fetched 3rd Nov, 2022 data on 04th Nov, 2022 from Historical API.
  • sujith
    Close price in the day candle is the settlement price published by the exchange after 6:00 PM. Hence it won't match the day candle close that is generated by the intraday data.
    There can be hundreds of ticks per second at the exchange but only 1 or 2 are published via internet.
    You can refer to this thread to know more about the way candle data works.
  • sukantary
    Yes Sujith. I understood your theory and I have already seen Nitin's post earlier. But still I have posted my concern here because I have not posted concern for different multiple platforms or different multiple charts. I got this mismatch between Portal and API for the same platform Zerodha. It seems that both are not using same data source.
    I don't have any major issue with this mismatch, but calculated Pivot Point, Support and Resistance values are different from Zerodha portal.
  • rakeshr
    I am fetching 15min historical data for NIFTY, API returns 25 candles. From those data I am calculating OHLC for the day and matching OHLC with Zerodha Kite Chart.
    Need some clarity here. So, you are fetching 15-minute candle from historical data APIs and forming day OHLC using the same and meanwhile, you are comparing the day time-frame/period candle on kite web charts. Is this flow correct?
    If yes, it can differ. This article explains the reason. The source for both kite web charts and historical data APIs is the same.
  • sukantary
    Thank you Rakeshr. Now I got the point. As per the article you shared, the source is different for the minute/hourly chart and daily chart.
    the minute/hourly charts will be formed using the ticks that we have received in our feed from the exchange and daily charts using the OHLC that exchange has sent on ‘bhavcopy
    Thanks for your clarification.
This discussion has been closed.