Skip to content

V3_INDEX_HISTORY_OHLC()

StandardPro
  • Aggregated OHLC bars that use SIP rules for each bar.
  • Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: bar timestamp <= trade time < bar timestamp + interval.
  • Exchanges typically generate a price report every second for popular indices like SPX.

Example

=THETADATA.V3_INDEX_HISTORY_OHLC("SPX", "20241104", "20241104", "1m", "09:30:00", "16:00:00")

Parameters

symbolRequired  -

The stock or index symbol, or underlying symbol for options.

Type: string
Behavior: Required.
start_dateRequired  -

The start date (inclusive).

Type: string
Behavior: Required.
end_dateRequired  -

The end date (inclusive).

Type: string
Behavior: Required.
interval  -

The size of the time interval must be one of the available options listed below. Intervals less than 1m are available only for single-day requests.

Type: string
Behavior: Optional (default: 1s).
Enumtick, 10ms, 100ms, 500ms, 1s, 5s, 10s, 15s, 30s, 1m, 5m, 10m, 15m, 30m, 1h
start_time  -

The start time (inclusive) in the specified day (format 24-hour HH:MM:SS.SSS).

Type: string
Behavior: Optional (default: 09:30:00).
end_time  -

The end time (inclusive) in the specified day (format 24-hour HH:MM:SS.SSS).

Type: string
Behavior: Optional (default: 16:00:00).

Returns

A grid (string[][]) - a header row followed by one row per result. See the REST API reference for the full response schema.