Skip to main content

Open Interest (OI) Dataโ€‹

API for retrieving Open Interest data across all strike prices for an underlying asset on a given expiry and date. It accepts the instrument key, expiry, and date, and returns aggregate call and put OI totals along with a per-strike breakdown of call OI and put OI.

Requestโ€‹

curl --location 'https://api.upstox.com/v2/market/oi?instrument_key=NSE_INDEX%7CNifty%2050&expiry=2026-05-29&date=2026-05-07' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

For additional samples in various languages, please refer to the Sample code section on this page.


Query Parametersโ€‹

NameRequiredDescription
instrument_keytrueUnderlying asset instrument key. For the regex pattern applicable to this field, see the Field Pattern Appendix.
expirytrueExpiry date of the option contract in YYYY-MM-DD format.
datetrueDate for which OI data is required, in YYYY-MM-DD format.
Responses

Response bodyโ€‹

{
"status": "success",
"data": {
"total_puts": 12500000,
"total_calls": 9800000,
"spot_closing_price": 24450.75,
"expiry": "2026-05-29",
"call_put_oi_data_list": [
{
"call_oi": 450000,
"put_oi": 680000,
"strike_price": 24000.0
},
{
"call_oi": 1200000,
"put_oi": 950000,
"strike_price": 24500.0
}
]
}
}
NameTypeDescription
statusstringOutcome of the request. Typically success for successful operations.
dataobjectOI data object.
data.total_putsintegerAggregate put open interest across all strikes.
data.total_callsintegerAggregate call open interest across all strikes.
data.spot_closing_pricenumberClosing spot price of the underlying asset.
data.expirystringExpiry date of the option contract.
data.call_put_oi_data_listarrayOI data for each strike price.
data.call_put_oi_data_list[].call_oiintegerCall open interest at this strike.
data.call_put_oi_data_list[].put_oiintegerPut open interest at this strike.
data.call_put_oi_data_list[].strike_pricenumberStrike price.

Sample Codeโ€‹

Get OI dataโ€‹

curl --location 'https://api.upstox.com/v2/market/oi?instrument_key=NSE_INDEX%7CNifty%2050&expiry=2026-05-29&date=2026-05-07' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'
Loading...