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:
-
Is it officially supported to fetch live option prices (CE/PE) via the Market Quote API?
-
If yes:
-
What is the correct and supported way to obtain the exact
instrument_keyfor options? -
Is there an instrument master / search / option chain API that should be used?
-
-
If no:
- Is manual instrument file usage the only supported approach for option trading via API?
-
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