Skip to content

OptionChain

Get the complete option chain for a given underlying and expiry, including quotes for all strikes.

Endpoint URL

http
Local Host   :  POST http://127.0.0.1:5000/api/v1/optionchain
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/optionchain
Custom Domain:  POST https://<your-custom-domain>/api/v1/optionchain

Sample API Request

json
{
  "apikey": "<your_app_apikey>",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "30DEC25",
  "strike_count": 10
}

Sample cURL Request

bash
curl -X POST http://127.0.0.1:5000/api/v1/optionchain \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "30DEC25",
  "strike_count": 10
}'

Sample API Response

json
{
  "status": "success",
  "underlying": "NIFTY",
  "underlying_symbol": "NIFTY",
  "underlying_exchange": "NSE_INDEX",
  "underlying_ltp": 26215.55,
  "underlying_prev_close": 26150.3,
  "expiry_date": "30DEC25",
  "expiry_ts": 1767087000,
  "server_ts": 1766115900,
  "atm_strike": 26200.0,
  "quotes_included": true,
  "greeks_included": false,
  "forward_price": null,
  "chain": [
    {
      "strike": 26100.0,
      "ce": {
        "symbol": "NIFTY30DEC2526100CE",
        "label": "ITM2",
        "ltp": 490,
        "bid": 490,
        "ask": 491,
        "bid_qty": 375,
        "ask_qty": 150,
        "open": 540,
        "high": 571,
        "low": 444.75,
        "prev_close": 496.8,
        "volume": 1195800,
        "oi": 0,
        "lotsize": 65,
        "tick_size": 0.05
      },
      "pe": {
        "symbol": "NIFTY30DEC2526100PE",
        "label": "OTM2",
        "ltp": 193,
        "bid": 191.2,
        "ask": 193,
        "open": 204.1,
        "high": 229.95,
        "low": 175.6,
        "prev_close": 215.95,
        "volume": 1832700,
        "oi": 0,
        "lotsize": 65,
        "tick_size": 0.05
      }
    },
    {
      "strike": 26200.0,
      "ce": {
        "symbol": "NIFTY30DEC2526200CE",
        "label": "ATM",
        "ltp": 427,
        "bid": 425.05,
        "ask": 427,
        "open": 449.95,
        "high": 503.5,
        "low": 384,
        "prev_close": 433.2,
        "volume": 2994000,
        "oi": 0,
        "lotsize": 65,
        "tick_size": 0.05
      },
      "pe": {
        "symbol": "NIFTY30DEC2526200PE",
        "label": "ATM",
        "ltp": 227.4,
        "bid": 227.35,
        "ask": 228.5,
        "open": 251.9,
        "high": 269.15,
        "low": 205.95,
        "prev_close": 251.9,
        "volume": 3745350,
        "oi": 0,
        "lotsize": 65,
        "tick_size": 0.05
      }
    },
    {
      "strike": 26300.0,
      "ce": {
        "symbol": "NIFTY30DEC2526300CE",
        "label": "OTM2",
        "ltp": 367.55,
        "bid": 364,
        "ask": 367.55,
        "open": 378,
        "high": 437.4,
        "low": 327.25,
        "prev_close": 371.45,
        "volume": 2416350,
        "oi": 0,
        "lotsize": 65,
        "tick_size": 0.05
      },
      "pe": {
        "symbol": "NIFTY30DEC2526300PE",
        "label": "ITM2",
        "ltp": 266,
        "bid": 264.2,
        "ask": 266.5,
        "open": 263.1,
        "high": 311.55,
        "low": 240,
        "prev_close": 289.85,
        "volume": 2891100,
        "oi": 0,
        "lotsize": 65,
        "tick_size": 0.05
      }
    }
  ]
}

Request Body

ParameterDescriptionMandatory/OptionalDefault Value
apikeyYour Tradeboard API keyMandatory-
underlyingUnderlying symbol (NIFTY, BANKNIFTY, SENSEX)Mandatory-
exchangeUnderlying exchange. Any value in the shared VALID_EXCHANGES listMandatory-
expiry_dateExpiry date in DDMMMYY formatMandatory-
strike_countNumber of strikes above and below ATM, 1 to 100, or nullOptionalAll strikes
with_greeksWhen true, attaches implied_volatility, delta, gamma, theta, and vega to every CE and PE leg, computed from the quotes already fetchedOptionalfalse
interest_rateAnnualized risk-free rate as a percentage, 0 to 100. Used only when with_greeks is trueOptional0

These seven fields are the complete OptionChainSchema. Any other field returns HTTP 400.

Broker adapters may use an optimized option-chain call; otherwise the service resolves contracts locally and retrieves quotes through the normalized market-data layer.

Response Fields

FieldTypeDescription
statusstring"success" or "error"
underlyingstringUnderlying base symbol
underlying_symbolstringThe exact symbol whose quote was used as the reference price
underlying_exchangestringThe exchange that reference quote came from
underlying_ltpnumberCurrent underlying price
underlying_prev_closenumberUnderlying previous close
expiry_datestringExpiry date in DDMMMYY format
expiry_tsnumberExact expiry instant as a Unix epoch value in seconds, or null if it could not be derived
server_tsnumberServer time as a Unix epoch value in seconds, so a client can correct for its own clock skew before computing time to expiry
atm_strikenumberAt-the-money strike price
quotes_includedbooleanWhether live quotes were attached to the legs
greeks_includedbooleanWhether Greeks were attached, that is with_greeks was true and quotes were available
forward_pricenumberForward price used for the Greeks, or null when Greeks were not computed
chainarrayArray of strike data

Chain Array Fields

FieldTypeDescription
strikenumberStrike price
ceobjectCall option data, or null when no CE contract exists at that strike
peobjectPut option data, or null when no PE contract exists at that strike

Option Data Fields

FieldTypeDescription
symbolstringOption symbol
labelstringATM, ITM1, ITM2..., OTM1, OTM2...
ltpnumberLast traded price
bidnumberBest bid price
asknumberBest ask price
bid_qtynumberQuantity at the best bid
ask_qtynumberQuantity at the best ask
opennumberDay's open
highnumberDay's high
lownumberDay's low
prev_closenumberPrevious close
volumenumberTrading volume
oinumberOpen interest
lotsizenumberLot size
tick_sizenumberTick size
implied_volatilitynumberOnly when with_greeks is true
deltanumberOnly when with_greeks is true
gammanumberOnly when with_greeks is true
thetanumberOnly when with_greeks is true
veganumberOnly when with_greeks is true

There is no rho on chain legs. Use Option Greeks for a single contract when you need it.

Notes

  • Without strike_count, returns the entire option chain for the expiry
  • The label field indicates whether the option is ATM, ITM, or OTM
  • For CE options: strikes below ATM are ITM, above are OTM
  • For PE options: strikes above ATM are ITM, below are OTM
  • Use this for options analysis and strategy selection
  • Greeks are skipped, and greeks_included comes back false, when the expiry instant cannot be derived or the chain has already expired

Use Cases

  • Option analysis: View premiums across strikes
  • Strategy selection: Find suitable strikes for spreads/strangles
  • Volatility analysis: Compare premiums at different strikes

Back to: API Documentation