I am trying to get the options chain data for the monthly expiries of bank nifty but when I use the api with the below below code I can only get the current week option chain? what changed do I make to get the monthly expiry option chain?
If you run the option chain API , you will see the response of all expiries , You can just pick the timestamp of the monthly expiry and use it in the inputs to get the data of specific expiry :
https://myapi.fyers.in/docsv3#tag/Data-Api/paths/~1DataApi/delete
Thanks! it worked well!
Hey @WWhYB2qrsx , I was using something similar to what Vamsi used. But I want to fetch NIFTY option-chain data.
data = {
"symbol":"NSE:NIFTY-INDEX",
"strikecount":"",
"timestamp": ""
}
fyers.optionchain(data=data)
But i got this in response
{'code': -300, 'data': {}, 'message': 'Please provide a valid symbol', 's': 'error'}
Dont we have NIFTY as a symbol, or I am using a wrong symbol here.
Would appreciate any response
I got the answer @WWhYB2qrsx , it is NIFTY50 I find out, sorry for double ping.

