AttributeError: 'FyersModel' object has no attribute 'optionchain'

I am using following code (same as described in the API documentation) to fetch oi data.

fyersModel = fyersModel.FyersModel(token=token, client_id=app_id, is_async=False)
data = {
    "symbol": "NSE:TCS-EQ",
    "strikecount":1,
    "timestamp": ""
}

response = fyersModel.optionchain(data=data)
print(response)

But I receive an error

AttributeError: 'FyersModel' object has no attribute 'optionchain'

Is this method not available in API V3?

Please refer the following document URL:

https://myapi.fyers.in/docsv3#tag/Data-Api/paths/~1DataApi/put

8 replies