Option Chain
This API gives entire Option Chain of any Option Instrument, across exchanges and segments - for NSE, BSE and MCX traded options. With Option Chain, you get OI, greeks, volume, top bid/ask and price data of all strikes of a particular underlying.
POST | /optionchain | Get Option Chain of any instrument |
POST | /optionchain/expirylist | Expiry List for Options of Underlying |
Info
You can call Option Chain API once every 3 seconds. This will give you latest updated data.
Option Chain
Retrieve real-time Option Chain across exchanges for all underlying. You can fetch Open Interest (OI), Greeks, Volume, Last Traded Price, Best Bid/Ask and Implied Volatility (IV) across all strikes for any underlying.
curl --location 'https://api.dhan.co/v2/optionchain' \
--header 'access-token: JWT' \
--header 'client-id: ClientId' \
--header 'Content-Type: application/json' \
--data '{}'
Header
Header | Description |
access-token required |
Access Token generated via Dhan |
client-id required |
User specific identification generated by Dhan |
Request Structure
{
"UnderlyingScrip":13,
"UnderlyingSeg":"IDX_I",
"Expiry":"2024-10-31"
}
Parameters
Field | Field Type | Description |
UnderlyingScri required |
int | Security ID of Underlying Instrument - can be found here |
UnderlyingSeg | enum string | Exchange & segment of underlying for which data is to be fetched - here |
Expiry | string | Expiry Date of Option, for which Option Chain is requested. List of active expiries can be fetched from here |
Response Structure
{
"data": {
"last_price": 24964.25,
"oc": {
.
.
"25000.000000": {
"ce": {
"greeks": {
"delta": 0.52546,
"theta": -12.88756,
"gamma": 0.00136,
"vega": 12.98931
},
"implied_volatility": 8.945204889199001,
"last_price": 125.05,
"oi": 5962675,
"previous_close_price": 190.45,
"previous_oi": 3939375,
"previous_volume": 831463,
"top_ask_price": 124.9,
"top_ask_quantity": 1000,
"top_bid_price": 124,
"top_bid_quantity": 100,
"volume": 84202625
},
"pe": {
"greeks": {
"delta": -0.48099,
"theta": -10.56587,
"gamma": 0.00092,
"vega": 13.00105
},
"implied_volatility": 13.321804909313869,
"last_price": 165,
"oi": 5059700,
"previous_close_price": 153.6,
"previous_oi": 4667700,
"previous_volume": 1047989,
"top_ask_price": 165,
"top_ask_quantity": 375,
"top_bid_price": 164.05,
"top_bid_quantity": 50,
"volume": 81097175
}
}
.
.
.
}
}
}
Parameters
Field | Type | Description |
data.last_price | float | LTP of the Underlying |
data.oc | array | Option Chain Array - Strike Wise |
data.oc.{strike} | array | Strike Price for Underlying |
data.oc.{strike}.ce | array | Call Option data of particular strike |
data.oc.{strike}.pe | array | Put Option data of particular strike |
Call/Put Option Data
Field | Type | Description |
greeks.delta | float | Measures the change of option's premium based on every 1 rupee change in underlying |
greeks.theta | float | Measures measures how quickly an option's value decreases over time |
greeks.gamma | float | Rate of change in an option's delta in relation to the price of the underlying asset |
greeks.vega | float | Measures the change of option's premium in response to a 1% change in implied volatility |
implied_volatility | float | Value of expected volatility of a stock over the life of the option |
last_price | float | Last Traded Price of the Option Instrument |
oi | int | Open Interest of the Option Instrument |
previous_close_price | float | Previous day close price |
previous_oi | int | Previous day Open Interest |
previous_volume | int | Previous day volume |
top_ask_price | float | Current best ask price available |
top_ask_quantity | int | Quantity available at current best ask price |
top_bid_price | float | Current best bid price available |
top_bid_quantity | int | Quantity available at current best bid price |
volume | int | Day volume for Option Instrument |
Expiry List
Retrieve dates of all expiries of any underlying, for which Options Instruments are active.
curl --request POST \
--url https://api.dhan.co/v2/optionchain/expirylist \
--header 'Content-Type: application/json' \
--header 'access-token: JWT' \
--header 'client-id: 1000000001' \
--data '{}'
Header
Header | Description |
access-token required |
Access Token generated via Dhan |
client-id required |
User specific identification generated by Dhan |
Request Structure
{
"UnderlyingScrip":13,
"UnderlyingSeg":"IDX_I"
}
Parameters
Field | Field Type | Description |
UnderlyingScri required |
int | Security ID of Underlying Instrument - can be found here |
UnderlyingSeg | enum string | Exchange & segment of underlying for which data is to be fetched - here |
Response Structure
{
"data": [
"2024-10-17",
"2024-10-24",
"2024-10-31",
"2024-11-07",
"2024-11-14",
"2024-11-28",
"2024-12-26",
"2025-03-27",
"2025-06-26",
"2025-09-25",
"2025-12-24",
"2026-06-25",
"2026-12-31",
"2027-06-24",
"2027-12-30",
"2028-06-29",
"2028-12-28",
"2029-06-28"
],
"status": "success"
}
Parameters
Field | Type | Description |
data[] | array | All expiry dates of underlying in YYYY-MM-DD |
Note
The rate limit applicable for Option Chain API is at 1 request per 3 second. This is because OI data gets updated slow, compared to LTP or other data parameter.
Note: For description of enum values, refer Annexure