Historical data API not fetching latest candle on real time

Ramji
Hi,

My intraday strategy is based on 5 mins Nifty Fut candles and I am using Historical API for the same. I am fetching the data (for past 5 days - 5 mins) at 9:15:15, 9:20:15 and so on..

My expectation is that when I run the API at 9:20:15, the latest 5 min candle should be for 9:20:00 however that is not the case. Sometimes it is still the previous candle i.e. 9:15:00 in this case. This happens with many of the API calls through out the day. Is this latency expected or I am making some obvious error? Also is there a better way to address this issue? Just to let you know my strategy checks the close price at the end of each 5 mins candles and perform some actions basis that.

I am new to python, coding and will really appreciate your guidance on this.

Thank You,
Ram

Tagged:
  • sujith
    @Ramji,
    The historical data API is provided only for backtesting purpose. For live market strategies, you can build candles at your end using the live market data provided on Websockets API.
    You can get started here.
Sign In or Register to comment.