History API: How can I download Historical Data of Expired Futures & Options?


I noticed; when we take latest instrument list update; expired Future & Option Instruments don't have a "instrument_token" attached to it.

But I want to back test few algos & I need historical data of these instruments.
How can I download this data without the "instrument_token"?

Also I would like to get NIFTY FUT data from last couple of years; the instrument list doesn't even have FUT instruments of last year.

Please help me get this data; as using History API without this data doesn't make sense for me at all...
  • sujith
    Hi @malay,
    Historical API fetch is currently based on instrument tokens. Exchange reuses a token once contract expires. Soon we will provide historical data for expired F&O contracts.
  • malay
    @sujith I believe you guys have your own local cache of data. Can you please help get me NIFTY Futures' and option's last two years data. It need not be served via API; just give me a dump please. It's very urgent for me. Or can you please suggest any other way to get it? any other vendor may be? I am willing to even pay a fair amount for it separately. Please Help.
  • sujith
    Hi @malay,
    We can't share it via mail or drive as it has regulations around it.
    You can check out globaldatafeeds or esignal.
  • malay
    @sujith Thanks for the pointers. Also is there a timeline when previous Futures will be available for download Via History API?
  • sujith
    Hi @malay,
    Our priority has been revamp of core APIs. Once we complete this we will start adding new features. I am afraid we can't guarantee any timeline as of now.
  • ManishGupta
    Hi @sujith Any update on getting expired F&O data via API?
  • sujith
    You can know more about continuous data here.
  • coolkoti
    The continuous data option gives only day candles. Do you not provide intraday data for futures? My primary objective is to get 5 min intraday candles for futures, but I don't get any data for previous months if even with continuous=1
  • sujith
    We don't have intra-day data for expired future instruments.
  • sagaranilganu
    In that case can you share "intraday tick / 1min Nifty Fut" data for Feb19 and March19 with 25Apr19 as contract expiry. Since it's current contract the "Instrument Token" is always available and since its previous months'; so would not breach regulations. Hope Zerodha business allows this!!
    Note: If not possible for 2 mts; 1mth will also do. Share on forum or Github or as is allowed.
    I am coding strategies and now need to back-test them before real trades.
  • rakeshr
    Yes,you can fetch 1min candle for NIFTY19APRFUT from 01-02-2019 to 31-03-2019.
    You need to subscribe to historical data and request to date as 2019-03-31 and from date as 01-02-2019-02-01,check the documentation here.
  • sagaranilganu
    Thanks for valuable response. But it's far far too early to subscribe to APIs. I am building multiple strategies in "Python" and first need to back-test them before going for any real.
    It would be a great deal of help if I get at least 1 mth/15/10 days in csv format!!!
  • sujith
    sujith edited April 11
    I am afraid we can't provide data in the csv format because of regulations. You can contact any of the exchange registered data vendor.You can only get day OHLC data from Nse website,here.
  • sagaranilganu
    sagaranilganu edited April 11
    Hi @sujith
    I understand your positions. In that case any names on fingertips?
    Any idea about whether NSEpy providing free for "intraday - ticks / 1min"??
    By far I see only day's OHLC. Pls direct me if possible that way.
    Anyways thanks!!
    [email protected]

Sign In or Register to comment.