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 ticks: Vec<PriceTick> = tdx.index_at_time_price(
"SPX", "20240101", "20240301", "34200000" // 9:30 AM ET
).await?;python
result = tdx.index_at_time_price("SPX", "20240101", "20240301", "34200000")go
atTime, err := client.IndexAtTimePrice("SPX", "20240101", "20240301", "34200000")
if err != nil {
log.Fatal(err)
}cpp
auto at_time = client.index_at_time_price("SPX", "20240101", "20240301", "34200000");Parameters
symbolstringrequiredIndex symbol (e.g.
"SPX")start_datestringrequiredStart date in
YYYYMMDD formatend_datestringrequiredEnd date in
YYYYMMDD formattime_of_daystringrequiredMilliseconds from midnight ET (e.g.
"34200000" for 9:30 AM)Response
Returns a Vec<PriceTick> 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) | Milliseconds |
|---|---|
| 9:30 AM | 34200000 |
| 12:00 PM | 43200000 |
| 4:00 PM | 57600000 |
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.