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 eod: Vec<EodTick> = tdx.stock_history_eod("AAPL", "20240101", "20240301").await?;
for t in &eod {
println!("{}: O={} H={} L={} C={} V={}",
t.date, t.open_price(), t.high_price(),
t.low_price(), t.close_price(), t.volume);
}python
eod = tdx.stock_history_eod("AAPL", "20240101", "20240301")
for tick in eod:
print(f"{tick['date']}: O={tick['open']:.2f} C={tick['close']:.2f} V={tick['volume']}")
# As DataFrame
df = tdx.stock_history_eod_df("AAPL", "20240101", "20240301")
print(df.describe())go
eod, err := client.StockHistoryEOD("AAPL", "20240101", "20240301")
if err != nil {
log.Fatal(err)
}
for _, tick := range eod {
fmt.Printf("%d: O=%.2f H=%.2f L=%.2f C=%.2f V=%d\n",
tick.Date, tick.Open, tick.High, tick.Low, tick.Close, tick.Volume)
}cpp
auto eod = client.stock_history_eod("AAPL", "20240101", "20240301");
for (auto& tick : eod) {
std::cout << tick.date << ": O=" << tick.open
<< " H=" << tick.high << " L=" << tick.low
<< " C=" << tick.close << " V=" << tick.volume << std::endl;
}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 / closei32Fixed-point OHLC prices. Use
open_price(), high_price(), low_price(), close_price() to get decoded f64 values.volumei32Total daily volume
counti32Total trade count for the day
bid_size / ask_sizei32Closing quote sizes
bid_exchange / ask_exchangei32Closing quote exchange codes
bid / aski32Closing bid/ask prices (fixed-point). Use
bid_price(), ask_price(), midpoint_value().bid_condition / ask_conditioni32Closing quote condition codes
price_typei32Decimal type used for fixed-point price decoding
datei32Date as
YYYYMMDD integerNotes
- Python users can use the
_dfvariant to get a pandas DataFrame directly:tdx.stock_history_eod_df(...). 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.