Issue in fetching Nifty Options Historical Data

I am unable to fetch historical option data of NIFTY, whereas SENSEX is working fine. I am using the below mentioned code. Pls help.

data = {
    "symbol":"NSE:NIFTY25APR22500CE",
    "resolution":"5S",
    "date_format":"1",
    "range_from":"2025-04-21",
    "range_to":"2025-04-24",
    "cont_flag":"1"
}

data = fyers.history(data=data)
data

The output that i'm getting:

{'code': -300, 'message': 'Invalid symbol provided', 's': 'error'}

1
5 replies