Option chain throw api

when i run code this it show result this
{‘status’: ‘success’, ‘data’: }
i not get option data

import requests

url = “https://api.upstox.com/v2/option/contract

headers = {
‘Accept’: ‘application/json’,
‘Authorization’: ‘Bearer *********’

params = {
‘instrument_key’: ‘NSE_INDEX|NIFTY 50’,


response = requests.request(“GET”, url, headers=headers, params=params)


@Udghosh_Rao You’ve referenced the incorrect instrument key. It’s case-sensitive. Please try again with the correct instrument key: NSE_INDEX|Nifty 50.

Below is the working curl request:

curl -X 'GET' \
  'https://api.upstox.com/v2/option/contract?instrument_key=NSE_INDEX%7CNifty%2050' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {auth_token}'

Do let us know if it works for you


it not working still show sucess status

@Udghosh_Rao Can you share the curl request for which you are getting empty response data with success status?

Thank you but can you share code for option chain live data
In Excel

Did you check upstox example code option chain api

this code works without any modification needed

@Chetan_Suri Thanks for the help here.