EOD
FreeValueStandardPro
Fetch end-of-day stock data for a date range. Returns OHLCV + bid/ask per trading day.
Since the equity SIPs only generate a partial EOD report, Theta Data generates a national EOD report at 17:15 ET each day. created represents the datetime the report was generated and last_trade represents the datetime of the last trade. The quote in the response represents the last NBBO reported by CTA or UTP at the time of report generation. You can read more about EOD & OHLC data here. Theta Data plans to avail SIP EOD reports in the near future.
rust
pub fn stock_history_eod(
&self,
symbol: &str,
start_date: &str,
end_date: &str,
) -> StockHistoryEodBuilder<'_>Execute with .await → Result<Vec<EodTick>, Error>, or decode chunk-by-chunk with .stream(handler).
Example
rust
let rows = tdx.stock_history_eod("AAPL", "20250303", "20250306").await?;
for t in &rows {
println!("date={} open={} close={} volume={}", t.date, t.open, t.close, t.volume);
}Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | yes | — | Ticker symbol (e.g. AAPL) |
start_date | date | yes | — | Start date YYYYMMDD |
end_date | date | yes | — | End date YYYYMMDD |
timeout_ms | int | no | — | Per-request deadline in milliseconds. 0 means no deadline. |
Response
Rows of EodTick:
| Field | Type | Description |
|---|---|---|
created_ms_of_day | i32 | EOD report creation time (NOT a trade time), milliseconds since midnight ET. |
last_trade_ms_of_day | i32 | Time of the day's last trade, milliseconds since midnight ET. 0 when no trades printed that day. |
open | f64 | Opening trade price. 0.0 when no trades printed that day. |
high | f64 | Highest traded price. 0.0 when no trades printed that day. |
low | f64 | Lowest traded price. 0.0 when no trades printed that day. |
close | f64 | Closing traded price. 0.0 when no trades printed that day. |
volume | i64 | Number of contracts or shares traded. |
count | i64 | Number of trades. |
bid_size | i32 | Last NBBO bid size. |
bid_exchange | i32 | Exchange code of the NBBO bid. |
bid | f64 | Last NBBO bid price. |
bid_condition | i32 | Quote condition code on the bid side. |
ask_size | i32 | Last NBBO ask size. |
ask_exchange | i32 | Exchange code of the NBBO ask. |
ask | f64 | Last NBBO ask price. |
ask_condition | i32 | Quote condition code on the ask side. |
date | i32 | Trading date as a YYYYMMDD integer. |
Example response
created_ms_of_day | last_trade_ms_of_day | open | high | low | close | volume | count | bid_size | bid_exchange | bid | bid_condition | ask_size | ask_exchange | ask | ask_condition | date |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 62273606 | 62271877 | 187.03 | 188.44 | 183.885 | 185.64 | 80680243 | 1003582 | 2 | 7 | 185.34 | 0 | 2 | 1 | 185.36 | 0 | 20240102 |
| 62189883 | 62188586 | 184.2 | 185.88 | 183.43 | 184.25 | 58308345 | 654127 | 5 | 7 | 184.05 | 0 | 2 | 1 | 184.1 | 0 | 20240103 |
| 62226020 | 62222445 | 182 | 183.0872 | 180.88 | 181.91 | 71197269 | 709246 | 8 | 60 | 181.76 | 0 | 2 | 7 | 181.79 | 0 | 20240104 |
Decoded from a captured production response; 3 of 4 rows shown.