OHLC Snapshot
StandardPro
REQUIRED
The Theta Terminal must be running to access data.
Behavior
Retrieves the real-time current day OHLC. Exchanges typically generate a price report every second for popular indices like SPX.
Sample URL
Paste the URL below into your browser while the Theta Terminal is running.
http://127.0.0.1:25510/v2/snapshot/index/ohlc?root=SPX
Output Descriptions
Field | Description |
---|---|
ms_of_day | Milliseconds since 00:00:00.000 (midnight) ET. |
open | The opening price of the trading session. |
high | The high price of the trading session. |
low | The low price of the trading session. |
close | The closing price of the trading session. |
date | The date the price report was generated formatted as YYYYMMDD. |
Parameters
Query Parameters
rootRequired -
The symbol of the security. Option underlyings for indices might have special tickers.
Type: string (Default: SPX)
Responses
OK
JSON
{
"header": {
"id": 0,
"latency_ms": 0,
"error_type": "string",
"error_msg": "string",
"next_page": null,
"format": [
"ms_of_day",
"open",
"high",
"low",
"close",
"volume",
"count",
"date"
]
},
"response": [
[
57745000,
5891.07,
5949.34,
5888.66,
5942.47,
0,
0,
20250103
]
]
}
Sample Code
py