stock_at_time_quote
Retrieve the NBBO quote at a specific time of day across a date range. Returns one quote per date, representing the prevailing best bid/ask at the specified time.
The time_of_day parameter is milliseconds from midnight ET (e.g., 34200000 = 9:30 AM).
FreeValueStandardPro
Code Example
rust
// Quote at 9:30 AM across Q1 2024
let quotes: Vec<QuoteTick> = tdx.stock_at_time_quote(
"AAPL", "20240101", "20240301", "34200000"
).await?;
for q in "es {
println!("{}: bid={} ask={}", q.date, q.bid_price(), q.ask_price());
}python
# Quote at 9:30 AM across Q1 2024
quotes = tdx.stock_at_time_quote("AAPL", "20240101", "20240301", "34200000")
for q in quotes:
print(f"{q['date']}: bid={q['bid']:.2f} ask={q['ask']:.2f}")go
// Quote at 9:30 AM across Q1 2024
quotes, err := client.StockAtTimeQuote("AAPL", "20240101", "20240301", "34200000")
if err != nil {
log.Fatal(err)
}
for _, q := range quotes {
fmt.Printf("%d: bid=%.2f ask=%.2f\n", q.Date, q.Bid, q.Ask)
}cpp
// Quote at 9:30 AM across Q1 2024
auto quotes = client.stock_at_time_quote("AAPL", "20240101", "20240301", "34200000");
for (auto& q : quotes) {
std::cout << q.date << ": bid=" << q.bid
<< " ask=" << q.ask << std::endl;
}Parameters
symbolstringrequiredTicker symbol
start_datestringrequiredStart date in
YYYYMMDD formatend_datestringrequiredEnd date in
YYYYMMDD formattime_of_daystringrequiredMilliseconds from midnight ET (e.g.
"34200000" = 9:30 AM)venuestringoptionalData venue filter
Response Fields (QuoteTick)
ms_of_dayi32Milliseconds since midnight ET
bid_size / ask_sizei32Quote sizes
bid_exchange / ask_exchangei32Exchange codes
bid / aski32Fixed-point prices. Use
bid_price(), ask_price(), midpoint_price() for decoded values.bid_condition / ask_conditioni32Condition codes
price_typei32Decimal type for price decoding
datei32Date as
YYYYMMDD integerHelper methods: bid_price(), ask_price(), midpoint_price(), midpoint_value()
Common Time Values
| Time (ET) | Milliseconds |
|---|---|
| 9:30 AM (market open) | "34200000" |
| 10:00 AM | "36000000" |
| 12:00 PM (noon) | "43200000" |
| 3:00 PM | "54000000" |
| 4:00 PM (market close) | "57600000" |
Notes
- Returns one QuoteTick per trading day in the date range.
- Useful for building daily spread time series or comparing bid/ask dynamics at a fixed time across trading sessions.
- The returned quote is the NBBO prevailing at the specified time.