OHLC
FreeValueStandardPro
Get the latest OHLC snapshot for one or more indices.
- Retrieves the real-time current day OHLC.
- Exchanges typically generate a price report every second for popular indices like SPX.
SPX
from thetadatadx import Client
client = Client.from_env()
rows = client.market_data.index_snapshot_ohlc(
"SPX",
)
for t in rows:
print(t.date, t.open, t.high, t.low, t.close) Sample response ·
JSON[
{
"close": 6395.78,
"count": 0,
"high": 6408.4,
"low": 6343.86,
"open": 6406.62,
"symbol": "SPX",
"timestamp": "2025-08-20T16:02:06",
"volume": 0
}
]Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | symbols | yes | — | Comma-separated ticker symbols (e.g. AAPL,MSFT) |
min_time | string | no | — | Minimum time filter |
timeout_ms | int | no | — | Per-request deadline in milliseconds. 0 means no deadline. |
Response
Rows of OhlcTick:
| Field | Type | Description |
|---|---|---|
ms_of_day | i32 | Opening time of the bar, milliseconds since midnight ET. |
open | f64 | Opening trade price. |
high | f64 | Highest traded price. |
low | f64 | Lowest traded price. |
close | f64 | Closing traded price. |
volume | i64 | Number of contracts or shares traded. |
count | i64 | Number of trades. |
vwap | f64 | Volume-weighted average price of the session. |
date | i32 | Trading date as a YYYYMMDD integer. |