Option Chain - Update frequqency

Dear Team,

In the Option Chain help api, currently we can just pass the expiry date for the Symbol in timestamp field. So we cannot go to a specific timestamp to fetch the option chain. The only option is to store the live feed of data coming from Option Chain api locally and calculate the required timeframe say 1min or 3min or 5min or … But my question is what is the frequency of data update in this api? The “oich” has a value being populated, what is the basis for this calculation?

Thank you.

Hey @111688361577888913505

The Option chain API is of daily timeframe and the data is live based o the time you are hitting the API , If you want the continous data for the same , please subscribe to our Websocket.
https://myapi.fyers.in/docsv3#tag/Web-Socket/paths/~1WebSocket/get

Thank you Abhishek, do we get Option chain as well from the websocket? In the documentation it is not stated. I only see an option to pass Symbol parameter, what is the call parameter to fetch option chain?

I am using the Fyers Option Chain API to fetch open interest information and I set the update frequency as 1 minute in my app but I see that the data is getting updated every 3 minutes only. Am I missing something?

@sridharan.tce-i37 The OI data is officially updated every 3 min by NSE for majority of strikes.

Sensibull comment

Stolo comment

hi nagesh,
ive been trying to fetch the option chain and literally tried everything as per my understanding and im still getting an error "Calling optionchain with payload: {‘symbol’: ‘NSE:NIFTY’, ‘expiry’: 1749117600}

raw chain_resp = {‘message’: ‘Please provide valid inputs’, ‘code’: -50, ‘s’: ‘error’}"

it would be a great if you could help me resolve this issue

@101798633686694900564 I hope you are using the correct end point for the data the end point is different. For option chain it is

https://api-t1.fyers.in/data/options-chain-v3. and these are the params as per documentation Request attributes

Attribute Data Type Description
symbol* string Mandatory. Eg: NSE:SBIN-EQ
strikecount int Options strike count for symbol(MAX = 50)
timestamp string Options chain data at timestamp’

sample method.

def get_option_chain(self, symbol, target_timestamp=None):
        try:
            url = f"{self.DATA_URL}/options-chain-v3"
            params = {"symbol": symbol, "strikecount": 100}
            if target_timestamp:
                params["timestamp"] = target_timestamp
            response = requests.get(url, params=params, headers=self.headers)
            response.raise_for_status()
            return response.json()
        except HTTPError as e:
            error_message = ''.join(traceback.format_exception(None, e, e.__traceback__))
            logger.error(f"HTTP error fetching option chain for {symbol}: {error_message}")
            raise
        except Exception as e:
            error_message = ''.join(traceback.format_exception(None, e, e.__traceback__))
            logger.error(f"Error fetching option chain for {symbol}: {error_message}")
            raise