Skip to content

option_history_open_interest

FreeValueStandardPro

Retrieve open interest history for an option contract.

Code Example

rust
let data = tdx.option_history_open_interest("SPY", "20260417", "550", "C", "20260315").await?;
for t in &data {
    println!("date={} open_interest={}", t.date, t.open_interest);
}
python
data = tdx.option_history_open_interest("SPY", "20260417", "550", "C", "20260315")
for t in data:
    print(f"date={t.date} open_interest={t.open_interest}")
typescript
const data = tdx.optionHistoryOpenInterest('SPY', '20260417', '550', 'C', '20260315');
for (const t of data) {
    console.log(`date=${t.date} open_interest=${t.open_interest}`);
}
cpp
auto data = client.option_history_open_interest("SPY", "20260417", "550", "C", "20260315");
for (const auto& t : data) {
    printf("date=%d open_interest=%d\n", t.date, t.open_interest);
}

Parameters

symbolstringrequired
Underlying symbol
expirationstringrequired
Expiration date in YYYYMMDD format
strikestringrequired
Strike price in dollars as a string
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

Sample Response

json
[
  {"date": 20260401, "open_interest": 28},
  {"date": 20260402, "open_interest": 32}
]

Daily open interest for a specific option contract.

Notes

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

Released under the Apache-2.0 License.