Fyers API Historical Data

@vikram_sri Hi,

I wanted to fetch historical data using Fyers API.

I am using the symbol nomenclature as mentioned from Fyers Docs, but getting error –

For example, I wanted 34900CE data from 30th December 2021 expiry and I am using below inputs to fetch from ‘history’ method –

{‘symbol’: ‘NSE:BANKNIFTY21123034900CE’, ‘resolution’: ‘3’, ‘date_format’: ‘1’, ‘range_from’: ‘2021-12-29’, ‘range_to’: ‘2021-12-30’, ‘cont_flag’: 1}

{‘symbol’: 'NSE: BANKNIFTY21DEC34900CE’, ‘resolution’: ‘3’, ‘date_format’: ‘1’, ‘range_from’: ‘2021-12-29’, ‘range_to’: ‘2021-12-30’, ‘cont_flag’: 1}

{‘symbol’: 'NSE:BANKNIFTY21D3034900CE’, ‘resolution’: ‘3’, ‘date_format’: ‘1’, ‘range_from’: ‘2021-12-29’, ‘range_to’: ‘2021-12-30’, ‘cont_flag’: 1}

But, I am getting the below error for any inputs-

{‘s’: ‘error’, ‘code’: -300, ‘message’: ‘Please provide a valid symbol’}

Can you please help me know what would be the correct symbol for fetching 34900CE data for 30th December 2021 expiry?

Hi Amit,
Currently historical data for expired symbols are not provided.
If you have doubts in the nomenclature or need to be sure about it, you can search for the symbol on trade.fyers.in, and the symbol ticker is the value encircled,

Thanks for the reply Vikram. Yes, for the Live options, I am already able to fetch the prices, thanks to Fyers API, by fetching the correct symbol name using https://public.fyers.in/sym_details/NSE_FO.csv

Is there any other way/hack to get the data for expired Nifty and BankNifty options?

Currently no, But I will let my team know about providing expired symbols data.

Thanks @vikram_sri that would help a lot to backtest.

Thanks Fyers and @tejas_khoday

Hi Vikram,

I am also looking to extract data from expired contracts. Please let me know when that is available.

Thanks,

Hi @vikram_sri

Any update on this?

Thanks

Vishnu

+1 I have Same request. Thank you

@amit_jadhav @vishnu_b @gR9X7GKWhA are you able to find any alternative approach to download the historical option data?

Hi @write2agb-hsv

We have initiated a post to know how many people are requested for this feature. Please let us know there

https://community.fyers.inhttps://fyers.in/community/t/how-many-of-you-require-historical-options-data-in-the-history-api/12958

So that we know how many are interested for this feature.

sure, thank you