Clarification on fetching live option prices via Upstox API (NIFTY weekly options)

Hello Upstox Support Team,

I am using the Upstox API for personal algorithmic trading (non-commercial, self account only).

I am able to successfully:

  • Authenticate using access tokens

  • Fetch live index data (e.g., NIFTY spot using instrument_key = NSE_INDEX|Nifty 50)

However, I am facing a consistent issue while fetching live option prices via the Market Quote API.

My use case:

  • Instrument: NIFTY weekly options (Tuesday expiry)

  • Strategy: ATM / ITM-1 option selling based on indicators (VWAP)

  • API endpoint used:
    GET /v2/market-quote/quotes

Issue observed:

When I pass valid-looking option instrument keys (example format below):

  • NSE_FO|NIFTYYYMMDD<STRIKE>CE

  • NSE_FO|NIFTYYYMMDD<STRIKE>PE

the API always returns:

HTTP 400
Error code: UDAPI1087
Message: One of either symbol or instrument_key is invalid

This happens even:

  • During live market hours

  • With a valid access token

  • With correct index data working from the same API

My clarification request:

  1. Is it officially supported to fetch live option prices (CE/PE) via the Market Quote API?

  2. If yes:

    • What is the correct and supported way to obtain the exact instrument_key for options?

    • Is there an instrument master / search / option chain API that should be used?

  3. If no:

    • Is manual instrument file usage the only supported approach for option trading via API?
  4. Are dynamically constructed option symbols supported at all for data fetching?

I want to ensure I am using the Upstox API strictly as per supported and compliant methods.

Looking forward to your guidance so I can proceed correctly.

Thank you for your support.

Regards,
Ashok

Hi @Mukesh2
You are using an invalid instrument key while fetching live market data.
Please refer to the official instrument JSON file to obtain the correct instrument keys.

Currently this is the only way you can get the correct instrument key

Thanks!