# Aggregates (OHLC)

Options **aggregate** endpoints cover: **custom-range OHLC bars** (many candles per request), the **previous completed session** as one daily bar, and a **single-calendar-day open / close** snapshot with pre-market and after-hours prices.

> **Quick definition: options aggregates are trade-derived OHLC bars. They summarize price path and activity, but they do not replace quote history when the question is executable bid/ask context.**

Related guide: [Options Aggregates API Guide](/options-aggregates-api-guide)

## When aggregates are the right data

Use aggregates when the workflow needs chartable history, indicator inputs, daily reports, event-study windows, or compact activity summaries. A one-minute or daily aggregate is easier to store and scan than every trade, and the `n` and `v` fields help show whether the bar came from a few isolated prints or a more active period.

Aggregates are not the same as tradable quotes. A bar high, low, open, or close is based on qualifying trades inside the interval. A strategy that buys exactly at a bar low or exits exactly at a bar high is usually making an optimistic assumption unless it can also show quote evidence around that timestamp.

| Research need | Aggregate value | Extra evidence to store |
| --- | --- | --- |
| Build indicators | OHLC, VWAP, volume, trade count | Bar width, date range, adjustment flag, and sort order. |
| Compare daily activity | Previous-day bar or custom daily range | Contract ticker, expiration, and whether missing dates had no qualifying trades. |
| Backtest signal generation | Completed bars only | Signal timestamp and the exact bar available before the decision. |
| Explain a fill | Aggregates are context, not proof | Nearest quote window and the selected fill rule. |
| Audit sparse contracts | `n`, `v`, and missing intervals | Reject or label bars with too few trades for the strategy. |

## Failure modes

The biggest mistake is treating an aggregate bar as an executable path. A daily high can occur before the signal, a low can be a single odd print, and an interval with no bar can simply mean no qualifying trades occurred. Keep missing bars explicit instead of filling them with zeros, and do not assume every contract has continuous minute history.

For backtests, calculate signals from completed bars and execute using quote-aware rules after the signal time. Store the request URL, `adjusted` setting, pagination sequence, and the exact returned bars so another developer can reproduce the result.

## Custom range bars

Retrieve custom-range **OHLC** (open, high, low, close) bars plus volume and trade counts for an options contract. Bars are built from **qualifying trades** in **Eastern Time (ET)**. Intervals with no qualifying trades are omitted from the series: those gaps mean no trading in that window, not an API error.

Use this for charts, technical analysis, backtests, and research.

<div data-try-url="/v1/options/aggs/O:NFLX260402C00075000/1/day/2026-01-01/2026-04-01/?limit=10"></div>

### Endpoint (custom range)

```
GET /v1/options/aggs/{ticker}/{multiplier}/{timespan}/{from_date}/{to_date}
```

#### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ticker` | string | Yes | Options contract ticker (for example `O:NFLX260402C00075000`). |
| `multiplier` | integer | Yes | Size of each bar relative to `timespan` (for example `1` with `day` for daily bars, `5` with `minute` for five-minute bars). |
| `timespan` | string | Yes | Bar width. Typical values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`. Unsupported values return an error. |
| `from_date` | string | Yes | Start of the range: `YYYY-MM-DD` **or** Unix time in **milliseconds** as a string. |
| `to_date` | string | Yes | End of the range: same formats as `from_date`. |

#### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `adjusted` | boolean | No | When `true` (default), bars are split-adjusted. Set `false` for raw (non-adjusted) aggregates. |
| `sort` | string | No | Order by bar timestamp: `asc` (oldest first) or `desc` (newest first). |
| `limit` | integer | No | Caps how many **base** aggregates (minute or day) the server reads to produce the returned bars. Default **5000**, maximum **10000**. Higher values return more complete long-range series at the cost of more work per request. |
| `page` | string | No | Pagination continuation: use the URL in `next_url`, or pass the `page` query value from that URL here. |

#### Response

Top-level fields:

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | Outcome of the request (for example `OK`). |
| `request_id` | string | Unique identifier for this request, assigned by CuteMarkets. |
| `ticker` | string | Contract symbol for this response. |
| `adjusted` | boolean | Whether these bars are split-adjusted. |
| `queryCount` | integer | Number of base aggregates used to build this response. |
| `resultsCount` | integer | Number of bars returned in `results`. |
| `count` | integer | Number of bars in this response; typically matches `resultsCount` and the length of `results`. |
| `results` | array | OHLC bar objects (see below). |
| `next_url` | string | When more bars exist for the range, full URL for the next page. |


Each element of `results`:

| Field | Type | Description |
| --- | --- | --- |
| `o` | number | Open price for the window. |
| `h` | number | High price. |
| `l` | number | Low price. |
| `c` | number | Close price. |
| `v` | number | Volume in the window. |
| `vw` | number | Volume-weighted average price (VWAP). |
| `t` | integer | Start of the bar as Unix time, **milliseconds**. |
| `n` | integer | Number of trades in the window. |

### Example request

```bash
curl \
  "https://api.cutemarkets.com/v1/options/aggs/O:NFLX260402C00075000/1/day/2026-01-01/2026-04-01/?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

More examples:

```bash
# Newest bars first
curl \
  "https://api.cutemarkets.com/v1/options/aggs/O:NFLX260402C00075000/1/day/2026-01-01/2026-04-01/?limit=10&sort=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Not split-adjusted
curl \
  "https://api.cutemarkets.com/v1/options/aggs/O:NFLX260402C00075000/1/day/2026-01-01/2026-04-01/?limit=10&adjusted=false" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Sample response

```json
{
  "ticker": "O:NFLX260402C00075000",
  "adjusted": true,
  "queryCount": 10,
  "resultsCount": 10,
  "count": 10,
  "results": [
    {
      "c": 5.05,
      "h": 6.2,
      "l": 5,
      "n": 9,
      "o": 6.2,
      "t": 1770872400000,
      "v": 18,
      "vw": 5.2461
    },
    {
      "c": 5.45,
      "h": 5.54,
      "l": 5,
      "n": 33,
      "o": 5.5,
      "t": 1770958800000,
      "v": 642,
      "vw": 5.3322
    }
  ],
  "status": "OK",
  "request_id": "cm_ac2d5134817a41a3987c2da8a79b57a7"
}
```

---

## Daily open and close

For a **single calendar date**, fetch regular-session open, high, low, close, and volume, plus **pre-market** and **after-hours** prices when available. Useful for daily performance, historical snapshots, extended-hours context, and portfolio tracking.

<div data-try-url="/v1/options/open-close/O:NFLX260402C00075000/2026-03-10/"></div>

### Endpoint (daily summary)

```
GET /v1/options/open-close/{ticker}/{date}
```

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ticker` | string | Yes | Options contract ticker (for example `O:NFLX260402C00075000`). |
| `date` | string | Yes | Session date, `YYYY-MM-DD`. |

### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `adjusted` | boolean | No | When `true` (default), prices are split-adjusted. Set `false` for non-adjusted values. |

### Response

The payload is a **flat object** and always includes **`request_id`**.

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | Outcome of the request (for example `OK`). |
| `request_id` | string | Identifier **assigned by CuteMarkets**. |
| `symbol` | string | Options contract ticker for this row. |
| `from` | string | The requested date (`YYYY-MM-DD`). |
| `open` | number | Regular-session open. |
| `high` | number | Regular-session high. |
| `low` | number | Regular-session low. |
| `close` | number | Regular-session close. |
| `volume` | number | Share volume for the session. |
| `preMarket` | number | Pre-market price (often the first print in that session), when present. |
| `afterHours` | number | After-hours close or last print, when present. |
| `otc` | boolean | Included and `true` only when the aggregate is for an OTC symbol; omitted when `false`. |
| `adjusted` | boolean | Split-adjustment flag when included in the payload. |

### Example request

```bash
curl \
  "https://api.cutemarkets.com/v1/options/open-close/O:NFLX260402C00075000/2026-03-10/" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```bash
curl \
  "https://api.cutemarkets.com/v1/options/open-close/O:NFLX260402C00075000/2026-03-10/?adjusted=false" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Sample response

```json
{
  "afterHours": 21.98,
  "close": 21.98,
  "from": "2026-03-10",
  "high": 21.98,
  "low": 21.98,
  "open": 21.98,
  "preMarket": 21.98,
  "status": "OK",
  "symbol": "O:NFLX260402C00075000",
  "volume": 2,
  "request_id": "cm_a1b2c3d4e5f6478990a1b2c3d4e5f678"
}
```

---

## Previous day bar

Returns the **prior trading day’s** daily OHLC bar for one options contract, open, high, low, close, volume, VWAP, trade count, and bar start timestamp. Use it for baselines, technical context, daily reports, and comparing “today” to the last session.

<div data-try-url="/v1/options/aggs/O:NFLX260402C00075000/prev/"></div>

### Endpoint (previous day)

```
GET /v1/options/aggs/{ticker}/prev
```

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ticker` | string | Yes | Options contract ticker (for example `O:NFLX260402C00075000`). |

### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `adjusted` | boolean | No | When `true` (default), the bar is split-adjusted. Set `false` for non-adjusted values. |

### Response

Same envelope as **custom range bars**: `status`, `request_id`, `ticker`, `adjusted`, `queryCount`, `resultsCount`, `results` (typically **one** object), and often `count` (bar count, usually `1`).

Each element of `results` uses the same OHLC fields as custom-range bars (`o`, `h`, `l`, `c`, `v`, `vw`, `t`, `n`). Some responses also include **`T`** (string), the contract ticker on the bar object.

### Example request

```bash
curl \
  "https://api.cutemarkets.com/v1/options/aggs/O:NFLX260402C00075000/prev/" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```bash
curl \
  "https://api.cutemarkets.com/v1/options/aggs/O:NFLX260402C00075000/prev/?adjusted=false" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Sample response

```json
{
  "adjusted": true,
  "count": 1,
  "queryCount": 1,
  "results": [
    {
      "T": "O:NFLX260402C00075000",
      "c": 22.7,
      "h": 22.7,
      "l": 22.07,
      "n": 4,
      "o": 22.07,
      "t": 1775160000000,
      "v": 4,
      "vw": 22.42
    }
  ],
  "resultsCount": 1,
  "status": "OK",
  "ticker": "O:NFLX260402C00075000",
  "request_id": "cm_a1b2c3d4e5f6478990a1b2c3d4e5f678"
}
```
