Invalid instrument key

Api request url -"https://api.upstox.com/v2/historical-candle/intraday/NSE_INDEX/1minute
Response -
“status”: “error”,
“errors”: [
{
“errorCode”: “UDAPI1021”,
“message”: “Instrument key is of invalid format”,
“propertyPath”: “getIntraDayCandleData.instrumentKey”,
“invalidValue”: “NSE_INDEX”,
“error_code”: “UDAPI1021”,
“property_path”: “getIntraDayCandleData.instrumentKey”,
“invalid_value”: “NSE_INDEX”
}
]
}

It seems like you’re attempting to retrieve data for the NSE_INDEX|Nifty 50. However, you’re using an incorrect instrument key, as indicated in the instruments file available at:

https://assets.upstox.com/market-quote/instruments/exchange/NSE.csv.gz

The appropriate URL for accessing Nifty 50 data is:

https://api.upstox.com/v2/historical-candle/intraday/NSE_INDEX%7CNifty%2050/1minute