stock_history_eod
End-of-day stock data across a date range. Each row contains the full daily OHLC bar plus closing bid/ask quote data (18 fields total).
FreeValueStandardPro
Code Example
rust
let data = tdx.stock_history_eod("SPY", "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.stock_history_eod("SPY", "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.stockHistoryEOD('SPY', '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.stock_history_eod("SPY", "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
symbolstringrequiredTicker symbol (e.g.
"AAPL")start_datestringrequiredStart date in
YYYYMMDD formatend_datestringrequiredEnd date in
YYYYMMDD format. Range is inclusive on both ends.Response Fields (EodTick)
ms_of_day / ms_of_day2i32Timestamps (milliseconds since midnight Eastern Time)
open / high / low / closef64OHLC prices (decoded at parse time).
volumei64Total daily volume
counti64Total trade count for the day
bid_size / ask_sizei32Closing quote sizes
bid_exchange / ask_exchangei32Closing quote exchange codes
bid / askf64Closing bid/ask prices (decoded at parse time).
bid_condition / ask_conditioni32Closing quote condition codes
datei32Date as
YYYYMMDD integerSample Response
json
[
{"date": 20260302, "open": 678.62, "high": 688.62, "low": 678.02, "close": 686.38, "volume": 87115983, "bid": 685.86, "ask": 685.90},
{"date": 20260303, "open": 674.95, "high": 682.61, "low": 669.66, "close": 680.33, "volume": 104510616, "bid": 679.20, "ask": 679.26},
{"date": 20260304, "open": 681.58, "high": 687.09, "low": 679.62, "close": 685.13, "volume": 78815016, "bid": 685.45, "ask": 685.60}
]SPY end-of-day data for March 2026. Full response contains 24 rows.
Notes
- Python users chain
.to_pandas()on the return value:tdx.stock_history_eod(...).to_pandas(). Requirespip install thetadatadx[pandas]. - EOD data includes the closing NBBO quote alongside OHLCV, making it suitable for strategies that need both price and spread information.
- All dates use
YYYYMMDDformat. The range is inclusive on both ends.