Skip to main content

Change in Open Interest (OI)โ€‹

API for retrieving the change in Open Interest per strike price for an underlying asset over a specified number of days. It accepts the instrument key, expiry, date, and interval, and returns the net OI change at each strike for both calls and puts โ€” positive values indicate new positions being built, negative values indicate unwinding.

Requestโ€‹

curl --location 'https://api.upstox.com/v2/market/change-oi?instrument_key=NSE_INDEX%7CNifty%2050&expiry=2026-05-29&date=2026-05-07&interval=2' \
--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 Change in OI data is required, in YYYY-MM-DD format.
intervaltrueNumber of days over which the OI difference is calculated.
Responses

Response bodyโ€‹

{
"status": "success",
"data": {
"total_put_change_oi": 2500000,
"total_call_change_oi": -1800000,
"spot_closing_price": 24450.75,
"expiry": "2026-05-29",
"call_put_oi_data_list": [
{
"strike_price": 24000.0,
"call_change_oi": -120000,
"put_change_oi": 350000
},
{
"strike_price": 24500.0,
"call_change_oi": 280000,
"put_change_oi": -150000
}
]
}
}
NameTypeDescription
statusstringOutcome of the request. Typically success for successful operations.
dataobjectChange in OI data object.
data.total_put_change_oiintegerNet change in put OI across all strikes.
data.total_call_change_oiintegerNet change in call OI 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_listarrayChange in OI data for each strike price.
data.call_put_oi_data_list[].strike_pricenumberStrike price.
data.call_put_oi_data_list[].call_change_oiintegerChange in call OI at this strike. Negative values indicate OI unwinding.
data.call_put_oi_data_list[].put_change_oiintegerChange in put OI at this strike. Negative values indicate OI unwinding.

Sample Codeโ€‹

Get Change in OI dataโ€‹

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