index_history_price
FreeValueStandardPro
Retrieve intraday price history for an index on a single date at a specified interval.
Code Example
rust
let data = tdx.index_history_price("SPX", "20260315", "60000").await?;
for t in &data {
println!("date={} ms_of_day={} price={:.2}", t.date, t.ms_of_day, t.price);
}python
data = tdx.index_history_price("SPX", "20260315", "60000")
for t in data:
print(f"date={t.date} ms_of_day={t.ms_of_day} price={t.price:.2f}")typescript
const data = tdx.indexHistoryPrice('SPX', '20260315', '60000');
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_history_price("SPX", "20260315", "60000");
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")datestringrequiredDate in
YYYYMMDD formatintervalstringrequiredAccepts milliseconds (
"60000") or shorthand ("1m"). Valid presets: 100ms, 500ms, 1s, 5s, 10s, 15s, 30s, 1m, 5m, 10m, 15m, 30m, 1h.start_timestringoptionalStart time of day as milliseconds from midnight
end_timestringoptionalEnd time of day as milliseconds from midnight
Response
Returns an array of PriceTick records with price and time fields:
pricef64Index price/level
ms_of_dayu32Milliseconds from midnight ET
dateu32Date as
YYYYMMDD integerSample Response
json
[
{"date": 20260402, "ms_of_day": 34200000, "price": 6820.51},
{"date": 20260402, "ms_of_day": 34260000, "price": 6828.42},
{"date": 20260402, "ms_of_day": 34320000, "price": 6834.15}
]SPX intraday price history at 1-minute intervals. Requires Value subscription.
Notes
- Returns an array of PriceTick records (typed per SDK).
- For OHLC-structured data across a date range, use index_history_ohlc instead.
- Operates on a single date only. For multi-day queries, use index_history_eod or index_history_ohlc.