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 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

symbolstringrequired
Index symbol (e.g. "SPX")
start_datestringrequired
Start date in YYYYMMDD format
end_datestringrequired
End date in YYYYMMDD format
time_of_daystringrequired
ET 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:

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)time_of_day
9:30 AM09:30:00.000
12:00 PM12:00:00.000
4:00 PM16: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.

Released under the Apache-2.0 License.