invalid interval for continuous data

sudipg
I want to get OHLC V OI data for BANKNIFTY with the below parameters.
instrument='16078850' # for BANKNIFTY22DECFUT
from_date_string= '2022-10-17 22:20:56'
to_date_string = '2022-12-06 22:20:57'
interval= '5minute'
data2 = pd.DataFrame(kite.historical_data(instrument, from_date_string, to_date_string, interval, True, True)) #--> This is NOT working.

Error: invalid interval for continuous data
Please help to fix this issue.
  • sujith
    Kite Connect only has day candle data for expired futures instruments.
  • rajnivp
    hi, i've 1 minute timeframe ohlc data for nifty/banknifty futures and options, you can contact me here [email protected]
  • Chedine
    @sujith - I'm facing the same for continous data with interval set to '5minute'. Continous works only for interval = day.. But the documentation and its example (relying on which i subscribed to the historical addon) doesn't say so. The example section shows a minute wise candle for continous data. Why is this discrepancy?

    https://kite.trade/docs/connect/v3/historical/#
  • rakeshr
    , the API will return **day candle records** for the same instrument's expired contracts. For instance, assuming the current month is January and you pass NIFTYJAN18FUT's instrument_token along with continuous=1, you can fetch **day candles** for December, November ... contracts by simply changing the from and to dates.
    Documentation of continuous data, clearly mentions it returns day candle only.
    The example section shows a minute wise candle for continuous data. Why is this discrepancy?
    The examples section represents a generic example of a Historical API response, not an example under the continuous data section. Go through the table of contents section flow. You can even check the curl request of the stated example with no continuous data argument.
    You can go through the FAQs section as well.
Sign In or Register to comment.