Skip to content

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

symbolstringrequired
Index symbol (e.g. "SPX")
start_datestringrequired
Start date in YYYYMMDD format
end_datestringrequired
End date in YYYYMMDD format
time_of_daystringrequired
Milliseconds from midnight ET (e.g. "34200000" for 9:30 AM)

Response

Returns a Vec<PriceTick> with one entry per trading day:

pricef64
Index price/level at the specified time
ms_of_dayu32
Actual milliseconds from midnight ET
dateu32
Date as YYYYMMDD integer

Time Reference

Time (ET)Milliseconds
9:30 AM34200000
12:00 PM43200000
4:00 PM57600000

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.

Released under the GPL-3.0-or-later License.