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 uses ET wall-clock format HH:MM:SS.SSS (for example 09:30:00.000). Legacy millisecond strings such as 34200000 are also accepted.
FreeValueStandardPro
Code Example
rust
let data = tdx.stock_at_time_quote("SPY", "20260101", "20260301", "09:30:00.000").await?;
for t in &data {
println!("date={} ms_of_day={} bid={:.2} ask={:.2} midpoint={:.2}",
t.date, t.ms_of_day, t.bid, t.ask, t.midpoint);
}python
data = tdx.stock_at_time_quote("SPY", "20260101", "20260301", "09:30:00.000")
for t in data:
print(f"date={t.date} ms_of_day={t.ms_of_day} "
f"bid={t.bid:.2f} ask={t.ask:.2f} midpoint={t.midpoint:.2f}")typescript
const data = tdx.stockAtTimeQuote('SPY', '20260101', '20260301', '09:30:00.000');
for (const t of data) {
console.log(`date=${t.date} ms_of_day=${t.ms_of_day} bid=${t.bid} ask=${t.ask} midpoint=${t.midpoint}`);
}cpp
auto data = client.stock_at_time_quote("SPY", "20260101", "20260301", "09:30:00.000");
for (const auto& t : data) {
printf("date=%d ms_of_day=%d bid=%.2f ask=%.2f midpoint=%.2f\n",
t.date, t.ms_of_day, t.bid, t.ask, t.midpoint);
}Parameters
symbolstringrequiredTicker symbol
start_datestringrequiredStart date in
YYYYMMDD formatend_datestringrequiredEnd date in
YYYYMMDD formattime_of_daystringrequiredET wall-clock time in
HH:MM:SS.SSS (e.g. "09:30:00.000"; legacy "34200000" is also accepted)venuestringoptionalData venue filter
Response Fields (QuoteTick)
ms_of_dayi32Milliseconds since midnight ET
bid_size / ask_sizei32Quote sizes
bid_exchange / ask_exchangei32Exchange codes
bid / askf64Bid/ask prices (decoded at parse time).
midpoint is pre-computed.bid_condition / ask_conditioni32Condition codes
datei32Date as
YYYYMMDD integerCommon Time Values
| Time (ET) | time_of_day |
|---|---|
| 9:30 AM (market open) | "09:30:00.000" |
| 10:00 AM | "10:00:00.000" |
| 12:00 PM (noon) | "12:00:00.000" |
| 3:00 PM | "15:00:00.000" |
| 4:00 PM (market close) | "16:00:00.000" |
Sample Response
json
[
{"date": 20260330, "ms_of_day": 43200000, "bid": 637.33, "ask": 637.34, "midpoint": 637.33},
{"date": 20260331, "ms_of_day": 43200000, "bid": 639.77, "ask": 639.79, "midpoint": 639.78},
{"date": 20260401, "ms_of_day": 43200000, "bid": 657.81, "ask": 657.82, "midpoint": 657.81}
]SPY quote at 12:00 PM ET on each date. One row per date in the range.
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.