Skip to content

index_snapshot_price

FreeValueStandardPro

Get the latest price snapshot for one or more index symbols. Returns the most recent price data as Vec<PriceTick>.

Code Example

rust
let ticks: Vec<PriceTick> = tdx.index_snapshot_price(&["SPX", "NDX"]).await?;
python
price = tdx.index_snapshot_price(["SPX", "NDX"])
go
price, err := client.IndexSnapshotPrice([]string{"SPX"})
if err != nil {
    log.Fatal(err)
}
cpp
auto price = client.index_snapshot_price({"SPX"});

Parameters

symbolsstring[]required
One or more index symbols
min_timestringoptional
Minimum time of day as milliseconds from midnight

Response

Returns a Vec<PriceTick> with price fields:

pricef64
Current index price/level
ms_of_dayu32
Milliseconds from midnight ET
dateu32
Date as YYYYMMDD integer

Notes

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