How to retieve HIstorical Data for Weekly Banknifty Expiry ?

HI @sujith

I am working on backtesting of bank nifty strategy but the issue is I am unable to fetch the historical data for it.
To extract previous week expiry data I am passing this week expiry token with continuous as 1

required_strike_instrument_symbol = "BANKNIFTY2082022300PE"
required_strike_instrument_token = 13999362
required_strike_data_list = kite.historical_data(required_strike_instrument_token, current_date, current_date, "day", continuous=1)
  • ganeshv02
    @Gafoor - Zerodha historical api does not provide expired option contracts data. You have to store it at your end. This is one of the reason I switched from option trading to futures as zerodha has the index and futures data for a longer period. It will be helpful to do back testing efficiently compared to option trading.
Sign In or Register to comment.