How to get history of F & O

SudhakarC
For example,
I need to get the details of 'BANKNIFTY 51000' for last 1 year. Like this need to get the values for all segments.
Tagged:
  • sujith
    Kite Connect only offers day candle data for expired futures instruments.
  • SudhakarC
    May i know how can i get day candle for expired future instruments in c#.
  • sujith
    Yes, you can get day candle data for expired futures instruments. You may refer to the documentation here.
  • Sravanthi_bh
    You may refer this in kite API doc. Also, click here for C# github link.
  • SudhakarC
    To get historical data, i need to pass 'instrument_token'. May i know where i can get the 'instrument_token' for expired futures instruments ?
  • Sravanthi_bh
    To fetch continuous data, you need to use live contracts instrument token, Check out instrument master file here.
  • SudhakarC
    I am using the below method to get the candles for expired futures instrument. Please find the details below. But result is empty.

    GetHistoricalData("9142530", new DateTime(2024,01,01), DateTime.Now, Interval: "day", true);

    Trading Symbol : BANKNIFTY2460549000CE
    instrument_token : 9142530
    expiry : 05-06-2024
  • Sravanthi_bh
    Sravanthi_bh edited April 22
    You need to try fetching data using the live contract instrument token for only futures. Please read this support article to understand about Continuous Data.
  • SudhakarC
    I can't find 'Continuous data' option. May i know how can i enable this 'Continuous data' option ?
  • Sravanthi_bh
    Continuous charts cannot be constructed for options, it is available for future contract.
  • SudhakarC
    I got it
This discussion has been closed.