How to fetch candlestick data for expired options?

Subhram
Subhram edited August 25 in General
Today is25 Aug 2024. I need candlestick data for bank nifty options for month of july, june and so on which are in past. For that I can use historical api where I need to provide instrument token. The instrument api is used to fetch all available instruments in NFO which contains current active option contract instruments. But it does not contain past option contract instruments. Then how will I get the candlestick data for already expired option contracts ? I need those for backtesting.
Anyone have any idea on how to achieve this . I have taken subscription for both kite api and historical data. 4000 INR. Please help here.
I am using kite's python client library.
  • ANL
    ANL edited August 25
    KIte API does not provide expired option data, go through: Historical candle data , Thread

    The possible way is to setup a WS connection, store tick data in any database, and create a candle for the required time frames. you have to do at you end.
  • Subhram
    Subhram edited August 27
    :(
  • ANL
    Kite provides historical data for trading options and equity; you may check with other NSE data vendors for expired data. I think it is a very expensive and inappropriate approach to subscribe to other data vendors for historical data. For just 50 tokens, they are charging 4000+GST/Month.

    The term backtest is not an easy task. If you don't know coding, then it will be very difficult. If you call for historical data, say for active options, then you must store the data in a database, and there are a lot of additional tasks to be performed.

    for doing backtesting. So it's better to subscribe to only the WS connection from the KIte API for Rs 2000 and then do what I said above.
  • Subhram
    Subhram edited September 6
    @ANL

    :) :) Thanks.

    I am a programmer and I am pretty fine with 4k per month. But what is all about 50 tokens ? Is this token is something related to number of api calls per month ? Can you share any resources to learn about pricing and all things related to what I am looking for ?

    If you could help me with some good vendors that would be great.

    1. Also what is the lowest time frame data that I can fetch from NSE vendors for expired option contract ?
    2. Can I get upto 2 years old any expired option contract data ?
  • ANL
    Hey,

    One thing I missed to mention is that the charge of 4K + GST per month is for only 1 websocket connection, and you can't open multiple WS connections like Kite API. This charge is only for 1 WS + 50 tokens without REST API.

    You can't use the REST service to retrieve LTP, OHLCV, etc.
    In Kite, you can use the quote API to call the required basic parameters, but in the other data vendors, you have to pay more and more.

    API is communicating with the instrument token and symbols. A token is a code number that represents an instrument, for example, EQ RELIANCE. The instrument token in Zerodha is 73856. You have to use this token to retrieve any data from API. Go through Kite Docs
    If you could help me with some good vendors that would be great.
    I am using Truedata WS service. They provide quality and clear data it has only less latency. I am using this for my specific use case. choosing a data vendor is also very subjective.
    1. Also what is the lowest time frame data that I can fetch from NSE vendors for expired option contract ?
    If you want to retrieve just historical data, the lowest time frame is 1 minute. A very few data vendors are providing expired option data. Kite or another broker doesn't provide. Check with TD.
    2. Can I get upto 2 years old any expired option contract data ?
    check with Truedata and Global data feeds
Sign In or Register to comment.