How to get live option chain data through fyers api?
Hi Akshay,
data = {"symbol":"NSE:BANKNIFTY23FEB42300CE","resolution":"1","date_format":"0","range_from":"1676866453","range_to":"1676880853","cont_flag":"1"}
print(fyers.history(data))
To get option chain data you can use above code where you have to pass name , time range and resolution.
Hi Akshay,
data = {"symbol":"NSE:BANKNIFTY23FEB42300CE","resolution":"1","date_format":"0","range_from":"1676866453","range_to":"1676880853","cont_flag":"1"}
print(fyers.history(data))
To get option chain data you can use above code where you have to pass name , time range and resolution.
@8Rr5ULRBVR is this correct symbol? getting an error {‘s’: ‘error’, ‘code’: -300, ‘message’: ‘Please provide a valid symbol’}
@balee_kumar_nagpure I just given example you have to provide valid Symbol and timestamp range.
You are getting error because that example symbol is expired on 23 feb.
@balee_kumar_nagpure I just given example you have to provide valid Symbol and timestamp range.
You are getting error because that example symbol is expired on 23 feb.