Skip to content

index_history_eod

FreeValueStandardPro

Retrieve end-of-day data for an index across a date range. Returns one row per trading day with open, high, low, close, and volume.

Code Example

rust
let data = tdx.index_history_eod("SPX", "20260101", "20260301").await?;
for t in &data {
    println!("date={} open={:.2} high={:.2} low={:.2} close={:.2} volume={}",
        t.date, t.open, t.high, t.low, t.close, t.volume);
}
python
data = tdx.index_history_eod("SPX", "20260101", "20260301")
for t in data:
    print(f"date={t.date} open={t.open:.2f} high={t.high:.2f} "
          f"low={t.low:.2f} close={t.close:.2f} volume={t.volume}")
typescript
const data = tdx.indexHistoryEOD('SPX', '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.index_history_eod("SPX", "20260101", "20260301");
for (const auto& t : data) {
    printf("date=%d open=%.2f high=%.2f low=%.2f close=%.2f volume=%d\n",
        t.date, t.open, t.high, t.low, t.close, t.volume);
}

Parameters

symbolstringrequired
Index symbol (e.g. "SPX")
start_datestringrequired
Start date in YYYYMMDD format
end_datestringrequired
End date in YYYYMMDD format

Response

dateu32
Date as YYYYMMDD integer
openf64
Opening price/level
highf64
High price/level
lowf64
Low price/level
closef64
Closing price/level
volumeu64
Volume

Sample Response

json
[
  {"date": 20260302, "open": 6824.36, "high": 6901.01, "low": 6796.85, "close": 6881.62, "volume": 0},
  {"date": 20260303, "open": 6800.26, "high": 6840.05, "low": 6710.42, "close": 6816.63, "volume": 0},
  {"date": 20260304, "open": 6831.69, "high": 6885.94, "low": 6811.64, "close": 6869.50, "volume": 0}
]

SPX end-of-day data for March 2026. Full response contains 24 rows.

Notes

  • Returns one row per trading day in the range. Non-trading days are excluded.
  • Python users chain .to_pandas() on the return value for a pandas DataFrame.

Released under the Apache-2.0 License.