fyers.history for Indexes doesn't work

I am unable to get details of the Indexes.

For example, when i query, NSE:NIFTY50-INDEX or NSE:BANKNIFTY-INDEX etc. i get invalid symbol.

Has anything changed ?

Below is my code snippet.

data = {"symbols":"NSE:NIFTY50-INDEX" }
response = fyers.quotes(data=data)

print(response)

#candlesData = fyers.history(data)

print(fyers.history({'symbol': 'NSE:BANKNIFTY-INDEX', 'resolution': 5, 'date_format': '1', 'range_from': '2023-11-07', 'range_to': '2023-11-07', 'cont_flag': '1'}))

3 replies