Fetching data for expired futures contracts

  1. How to fetch data for expired futures contracts ? (Say for nifty-jan2025-futures expiry)

2.Also, How to construct/generate the instrument/symbol for future contact ? - if there is a simpler way to do

Hi @_serotonin,

Historical data for expired contracts is not available.

Additionally, you may refer to this post for guidance on generating instrument keys. A complete list of all instrument keys is also available in our JSON files here: Upstox Instruments JSON.

Thank you!