Skip to content

option_history_eod

FreeValueStandardPro

Retrieve end-of-day option data across a date range. Returns one row per trading day with OHLC, volume, and open interest.

Code Example

rust
let data = tdx.option_history_eod("SPY", "20260417", "550", "C", "20260101", "20260301").await?;
for t in &data {
    println!("date={} open={:.2} high={:.2} low={:.2} close={:.2} volume={} bid={:.2} ask={:.2}",
        t.date, t.open, t.high, t.low, t.close, t.volume, t.bid, t.ask);
}
python
data = tdx.option_history_eod("SPY", "20260417", "550", "C", "20260101", "20260301")
for t in data:
    print(f"date={t.date} open={t.open:.2f} high={t.high:.2f} low={t.low:.2f} "
          f"close={t.close:.2f} volume={t.volume} bid={t.bid:.2f} ask={t.ask:.2f}")
typescript
const data = tdx.optionHistoryEOD('SPY', '20260417', '550', 'C', '20260101', '20260301');
for (const t of data) {
    console.log(`date=${t.date} open=${t.open} high=${t.high} low=${t.low} close=${t.close} volume=${t.volume}`);
}
cpp
auto data = client.option_history_eod("SPY", "20260417", "550", "C", "20260101", "20260301");
for (const auto& t : data) {
    printf("date=%d open=%.2f high=%.2f low=%.2f close=%.2f volume=%d bid=%.2f ask=%.2f\n",
        t.date, t.open, t.high, t.low, t.close, t.volume, t.bid, t.ask);
}

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
start_datestringrequired
Start date in YYYYMMDD format
end_datestringrequired
End date in YYYYMMDD format
max_dteintoptional
Maximum days to expiration
strike_rangeintoptional
Strike range filter

Response

strike_range filters a wildcard bulk request. If you pin strike to one contract, the response stays single-strike. Use strike="0" in ThetaDataDx SDK/MCP or strike=* in the v3 REST API when you want multi-strike EOD output.

datestring
Trading date
openfloat
Opening price
highfloat
High price
lowfloat
Low price
closefloat
Closing price
volumeint
Daily volume
open_interestint
Open interest

Sample Response

json
[
  {"date": 20260302, "open": 131.57, "high": 138.32, "low": 131.57, "close": 138.32, "volume": 2, "bid": 136.89, "ask": 139.70},
  {"date": 20260303, "open": 0.00, "high": 0.00, "low": 0.00, "close": 0.00, "volume": 0, "bid": 131.05, "ask": 133.87},
  {"date": 20260305, "open": 129.73, "high": 129.73, "low": 129.73, "close": 129.73, "volume": 1, "bid": 131.75, "ask": 134.55}
]

EOD data for SPY 2026-04-17 550 call. Days with no trades show 0.00 for OHLC but still have closing bid/ask.

Released under the Apache-2.0 License.