Skip to content

option_history_open_interest

FreeValueStandardPro

Retrieve open interest history for an option contract.

Code Example

rust
let oi: Vec<OpenInterestTick> = tdx.option_history_open_interest(
    "SPY", "20241220", "500000", "C", "20240315"
).await?;
python
oi = tdx.option_history_open_interest("SPY", "20241220", "500000", "C", "20240315")
go
oi, err := client.OptionHistoryOpenInterest("SPY", "20241220", "500000", "C", "20240315")
cpp
auto oi = client.option_history_open_interest("SPY", "20241220", "500000", "C", "20240315");

Parameters

symbolstringrequired
Underlying symbol
expirationstringrequired
Expiration date in YYYYMMDD format
strikestringrequired
Strike price as scaled integer
rightstringrequired
"C" for call, "P" for put
datestringrequired
Date in YYYYMMDD format
max_dteintoptional
Maximum days to expiration
strike_rangeintoptional
Strike range filter

Response

open_interestint
Open interest
datestring
Date

Notes

  • Open interest is typically reported once per day based on the previous day's settlement.

Released under the GPL-3.0-or-later License.