Inconsistent Data for Historic API 5 minutes

vinaychhabra21
I am using historic data to fetch 5 minute data for nifty future, but the data is not correct.
If I compare the data downloaded from API with the chart data from excel closing price have some variation. Request you to kindly check the same.
  • rakeshr
    rakeshr edited January 3
    @vinaychhabra21
    We have compared 5-minute candle data of Historical APIs and kite web chart, we weren't able to find any difference in OHLCV on both data.
  • vinaychhabra21
    @rakeshr : I think this is one off issue and is working fine now.
    how much time will historic api take to generate 5 minute candle
    For e.g., today @ 14:36:10 I have generated 5 minute data using Historic API for nifty its showing 10800.35 but in next 5 minute its changed to 10796.9. Can you please share the time when correct values are generated. Is it more than 10 seconds
  • suraj3003
    Dear Vinay

    We can help you out with your above query, It is very much possible in our platform with more customizable options

    Kindly contact : [email protected]
    Call : +91 8879647666
  • rakeshr
    @vinaychhabra21
    The way historical APIs work is, all the ticks in a given period is captured and is written to the database. There can be a delay in write operation to the database. So, to get complete candle OHLCV data, you need to add a buffer period of 10-20 seconds. Eg: For 10:30 AM 15 minute candle, you need to request it at 10:45:15 AM or later.

    PS: The historical data is provided only for backtesting purpose. We don't recommend using it for live strategies. You can use Web sockets data to generate candle data at your end.
  • vinaychhabra21
    @rakeshr : can you please share the logic how close price is calculated or any thread that I can refer to get 5 minute data candles
  • rakeshr
    @vinaychhabra21
    Close price is last tick received for the specific candle period.
  • vinaychhabra21
    @rakesh : I have tried the same logic to get ltp at closing of 5 minute but this is not the logic if that is the case closing of 1 minute and 5 minute candle will be same.
    Also for 5minute candle I have used historical API closing is changing every 10second till next candle is created
    Can you please suggest me how to overcome this issue
    E.g., closing for candle 1:21 to 1:26 is 100.00 at 1:26:01 it's changes to 100.2 at 1:26:11 till 1:30. So there is 5 minute lag for 5 minute candle
  • rakeshr
    @vinaychhabra21
    Yeah, the closing of 1 minute of last closing candle and 5-minute candle will be same. You can refer below example for SBIN(779521):
    5minute candle:
    2019-01-11 14:55:00+05:30,303.35,303.6,303.2,303.45,125898
    1 Minute candle:
    2019-01-11 14:59:00+05:30,303.5,303.6,303.3,303.45,25759
    Also for 5minute candle I have used historical API closing is changing every 10second till next candle is created
    Can you please suggest me how to overcome this issue ?
    Yes, candle HLC will change as still current candle period is running.Once next candle is formed, HLC data will be fixed.
    E.g., closing for candle 1:21 to 1:26 is 100.00 at 1:26:01 it's changes to 100.2 at 1:26:11 till 1:30. So there is 5 minute lag for 5 minute candle
    No,it's not an lag.5 minute candle of 1:25 PM will be formed post 1:30PM.
Sign In or Register to comment.