Historical minute candle data returns empty array

kkssc
Given a instrument_token of Futures & Options (consider TCS) for given one 2 months date I am getting empty candle data.
Could anyone please help me out to figure out the issue? It works fine for other instruments.

Input: https://api.kite.trade/instruments/historical/${instrument_token}/minutes?from=2020-04-01+09:30:00&to=2020-05-31+10:30:00`
Output: {"status": "success", "data": { "candles":[]}}
  • rakeshr
    For expired F&O contract historical data, you need to use continuous data, which is available only for interval="day".
  • kkssc
    Hi I tried changing it to day, and it still doesn't work. Could you please help me figure out what's the issue? I want to fetch entries of F&Os from 1st of May to 31st of May

    For example I have considered following instrument token: 22686978 which is a valid one.

    I am getting this error:

    "status":"error","message":"contract not found

    URL that I am using:

    https://api.kite.trade/instruments/historical/${instrument_token}/day?from=2020-05-01%2009:15:00&to=2020-05-31%2009:20:00&oi=1
  • sujith
    For which instrument are you trying to fetch data for?
  • kkssc
    TCS F&O
    This is the instrument_token : 22686978
  • rakeshr
    We weren't able to find any active instrument with an instrument token 22686978. You can retrieve the complete instrument list from here. Can you let us know the complete trading symbol/contract name you are looking for? eg: TCS20OCTFUT
  • kkssc
    TCS20SEP1900CE
  • rakeshr
    TCS20SEP1900CE
    It's an expired option contract. You won't be able to fetch historical data for expired option contracts. You can only fetch day candle historical data for Future contracts using continuous data.
  • kkssc
    Ok. Thanks
This discussion has been closed.