How can I get historic candles data of options?

I am trying to analyze historic data options of index funds. But I am stuck in 2 places.

  1. The Scrip Master is not showing data for expired contracts. So I am not able to get the Scrip Code for the same.
  2. The historic candle for some reason is returning empty list in the data part even for the active option contracts (ExchType-D) with status success. But the same is return data if I use the scrip code of cash (ExchType-C).

https://Openapi.5paisa.com/V2/historical/N/D/35127/1d?from=2025-09-01&end=2025-10-01

{
    "status": "success",
    "data": {
        "candles": []
    },
    "scripcode": 0
}

@josetuttu Welcome to our community.

  1. Currently we support Historical Candle data only for live scripts. Expired contracts are not supported.
  2. As there is no chart data/historical candle data present for Scrip 35127(NIFTY 28 OCT 2025 CE 19350.00) the api is returning blank data. This is most likely because the strike is illiquid.

For more such queries you can further explore our ChatGPT assistant.