index_at_time_price
FreeValueStandardPro
Retrieve the index price at a specific time of day for every trading day in a date range. Returns one data point per date, useful for consistent daily sampling.
Code Example
rust
let data = tdx.index_at_time_price("SPX", "20260101", "20260301", "09:30:00.000").await?;
for t in &data {
println!("date={} ms_of_day={} price={:.2}", t.date, t.ms_of_day, t.price);
}python
data = tdx.index_at_time_price("SPX", "20260101", "20260301", "09:30:00.000")
for t in data:
print(f"date={t.date} ms_of_day={t.ms_of_day} price={t.price:.2f}")typescript
const data = tdx.indexAtTimePrice('SPX', '20260101', '20260301', '09:30:00.000');
for (const t of data) {
console.log(`date=${t.date} ms_of_day=${t.ms_of_day} price=${t.price}`);
}cpp
auto data = client.index_at_time_price("SPX", "20260101", "20260301", "09:30:00.000");
for (const auto& t : data) {
printf("date=%d ms_of_day=%d price=%.2f\n", t.date, t.ms_of_day, t.price);
}Parameters
symbolstringrequiredIndex symbol (e.g.
"SPX")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)Response
Returns an array of PriceTick records with one entry per trading day:
pricef64Index price/level at the specified time
ms_of_dayu32Actual milliseconds from midnight ET
dateu32Date as
YYYYMMDD integerTime Reference
| Time (ET) | time_of_day |
|---|---|
| 9:30 AM | 09:30:00.000 |
| 12:00 PM | 12:00:00.000 |
| 4:00 PM | 16:00:00.000 |
Sample Response
json
[
{"date": 20260330, "ms_of_day": 43200000, "price": 6742.18},
{"date": 20260331, "ms_of_day": 43200000, "price": 6768.45},
{"date": 20260401, "ms_of_day": 43200000, "price": 6891.33}
]SPX price at 12:00 PM ET on each date. One row per date in the range. Requires Value subscription.
Notes
- Returns the price at or just before the specified time of day.
- Useful for building daily time series at a consistent sample point (e.g. market open, noon, close).
- Non-trading days are excluded from the response.