Historical Data for expired Contracts

Hi all,

I would like to know if I could extract expired data for MCX future contracts.

I went through the documentation but not clear about the following phrase

"This is where continuous API comes in which works for NFO and MCX futures contracts. Given a live contract's instrument_token, 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."

Eg: can I get crude oil future data for Jan2017 data by using the current instrument token of (CRUDEOILAUGFUT) using continuous=1 and start date as 1/1/2017 and end as 1/1/2019?
  • rakeshr
    Yeah,you can get day candle data for an expired future contract using continous=1.
    kite.historical_data(instrument_token=54743047,from_date='2017-01-01', to_date='2019-01-01', interval="day",continuous=1)
  • navinshankaran
    Thanks a lot :)
This discussion has been closed.