# Market data

> Candles, funding rates, open interest, instruments and the latest tickers.

Page: https://docs.aggre.org/api/data/market · Section: API reference · All pages: https://docs.aggre.org/llms.txt

Crypto market data by venue. Concepts and caveats are in the [market data guide](https://docs.aggre.org/datasets/market.md). Instruments are identified as `{VENUE}:{PRODUCT}:{native}`, for example `OKX:SPOT:SOL-USDC`.

On this page:

- [Confirmed one-minute candles of one instrument](#candles1M): `GET /v1/finance/market/candles_1m`
- [Confirmed one-hour candles of one instrument](#candles1H): `GET /v1/finance/market/candles_1h`
- [Confirmed one-day candles of one instrument](#candles1D): `GET /v1/finance/market/candles_1d`
- [Settled funding payments of a perpetual](#fundingRates): `GET /v1/finance/market/funding_rates`
- [Open-interest snapshots of a perpetual](#openInterest): `GET /v1/finance/market/open_interest`
- [The instrument list](#listInstruments): `GET /v1/finance/market/instruments`
- [The latest ticker of every enabled instrument](#listTickers): `GET /v1/finance/market/tickers`

## Confirmed one-minute candles of one instrument {#candles1M}

`GET /v1/finance/market/candles_1m`

Only confirmed bars. `ts` is the bar open (Unix ms UTC). **No cursor paging yet:** `next_cursor` is always null; read further with `from`/`to`. Dataset `finance.market.candles_1m`; semantics in [the dataset guide](https://docs.aggre.org/datasets.md).

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `instrument_id` | query | yes | string | `{VENUE}:{PRODUCT}:{native}`, e.g. OKX:SPOT:SOL-USDC. Funding and open interest need a PERP or FUTURES id. |
| `from` | query | no | integer, int64 | Unix ms, inclusive (on `ts`). |
| `to` | query | no | integer, int64 | Unix ms, exclusive (on `ts`). Must be later than `from`. |
| `limit` | query | no | integer, 1–1000, default `100` | Rows per page. |
| `order` | query | no | `asc` \| `desc` (default `desc`) | Sort direction (default newest first). |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/candles_1m?instrument_id=OKX:SPOT:SOL-USDC&limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`candles`](https://docs.aggre.org/api/schemas.md#candles).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).

## Confirmed one-hour candles of one instrument {#candles1H}

`GET /v1/finance/market/candles_1h`

Only confirmed bars. `ts` is the bar open (Unix ms UTC). **No cursor paging yet:** `next_cursor` is always null; read further with `from`/`to`. Dataset `finance.market.candles_1h`; semantics in [the dataset guide](https://docs.aggre.org/datasets.md).

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `instrument_id` | query | yes | string | `{VENUE}:{PRODUCT}:{native}`, e.g. OKX:SPOT:SOL-USDC. Funding and open interest need a PERP or FUTURES id. |
| `from` | query | no | integer, int64 | Unix ms, inclusive (on `ts`). |
| `to` | query | no | integer, int64 | Unix ms, exclusive (on `ts`). Must be later than `from`. |
| `limit` | query | no | integer, 1–1000, default `100` | Rows per page. |
| `order` | query | no | `asc` \| `desc` (default `desc`) | Sort direction (default newest first). |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/candles_1h?instrument_id=OKX:SPOT:SOL-USDC&limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`candles`](https://docs.aggre.org/api/schemas.md#candles).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).

## Confirmed one-day candles of one instrument {#candles1D}

`GET /v1/finance/market/candles_1d`

Only confirmed bars. `ts` is the bar open (Unix ms UTC). **No cursor paging yet:** `next_cursor` is always null; read further with `from`/`to`. Dataset `finance.market.candles_1d`; semantics in [the dataset guide](https://docs.aggre.org/datasets.md).

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `instrument_id` | query | yes | string | `{VENUE}:{PRODUCT}:{native}`, e.g. OKX:SPOT:SOL-USDC. Funding and open interest need a PERP or FUTURES id. |
| `from` | query | no | integer, int64 | Unix ms, inclusive (on `ts`). |
| `to` | query | no | integer, int64 | Unix ms, exclusive (on `ts`). Must be later than `from`. |
| `limit` | query | no | integer, 1–1000, default `100` | Rows per page. |
| `order` | query | no | `asc` \| `desc` (default `desc`) | Sort direction (default newest first). |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/candles_1d?instrument_id=OKX:SPOT:SOL-USDC&limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`candles`](https://docs.aggre.org/api/schemas.md#candles).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).

## Settled funding payments of a perpetual {#fundingRates}

`GET /v1/finance/market/funding_rates`

`instrument_id` must be a PERP or FUTURES id. `rate` is that period's fraction as the venue reports it, not annualised. `next_cursor` is always null. Stale after 24 h. Dataset `finance.market.funding_rates`.

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `instrument_id` | query | yes | string | `{VENUE}:{PRODUCT}:{native}`, e.g. OKX:SPOT:SOL-USDC. Funding and open interest need a PERP or FUTURES id. |
| `from` | query | no | integer, int64 | Unix ms, inclusive (on `ts`). |
| `to` | query | no | integer, int64 | Unix ms, exclusive (on `ts`). Must be later than `from`. |
| `limit` | query | no | integer, 1–1000, default `100` | Rows per page. |
| `order` | query | no | `asc` \| `desc` (default `desc`) | Sort direction (default newest first). |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/funding_rates?instrument_id=OKX:SPOT:SOL-USDC&limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`funding_rates`](https://docs.aggre.org/api/schemas.md#funding_rates).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).

## Open-interest snapshots of a perpetual {#openInterest}

`GET /v1/finance/market/open_interest`

`instrument_id` must be a PERP or FUTURES id. A snapshot in base-asset units; history starts the day collection starts. `next_cursor` is always null. Stale after 30 min. Dataset `finance.market.open_interest`.

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `instrument_id` | query | yes | string | `{VENUE}:{PRODUCT}:{native}`, e.g. OKX:SPOT:SOL-USDC. Funding and open interest need a PERP or FUTURES id. |
| `from` | query | no | integer, int64 | Unix ms, inclusive (on `ts`). |
| `to` | query | no | integer, int64 | Unix ms, exclusive (on `ts`). Must be later than `from`. |
| `limit` | query | no | integer, 1–1000, default `100` | Rows per page. |
| `order` | query | no | `asc` \| `desc` (default `desc`) | Sort direction (default newest first). |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/open_interest?instrument_id=OKX:SPOT:SOL-USDC&limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`open_interest`](https://docs.aggre.org/api/schemas.md#open_interest).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).

## The instrument list {#listInstruments}

`GET /v1/finance/market/instruments`

Dataset `finance.market.instruments` (Postgres). No cursor. 503 `store_unavailable` when `finance_db` is not configured.

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `venue` | query | no | string, pattern `^[A-Z0-9]+$` | Exact venue code: uppercase letters and digits (OKX, BITGET, HYPERLIQUID ...). |
| `product` | query | no | `SPOT` \| `PERP` \| `FUTURES` |  |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/instruments" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`instruments`](https://docs.aggre.org/api/schemas.md#instruments).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).

## The latest ticker of every enabled instrument {#listTickers}

`GET /v1/finance/market/tickers`

One row per enabled instrument, latest only: no history, no cursor. The 24 h figures are the venue's rolling 24 hours and null where the venue does not send them. Dataset `finance.market.tickers_latest`.

**Parameters**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `venue` | query | no | string, pattern `^[A-Z0-9]+$` | Exact venue code: uppercase letters and digits (OKX, BITGET, HYPERLIQUID ...). |
| `product` | query | no | `SPOT` \| `PERP` \| `FUTURES` |  |
| `instrument_id` | query | no | string | Exact; must agree with `venue`/`product` when they are given. |

**Example**

```bash
curl -s "https://api.aggre.org/v1/finance/market/tickers" \
  -H "Authorization: Bearer $AGGRE_API_KEY"
```

**Response** `200`: the envelope `{ "data": [...], "meta": {...}, "next_cursor": ... }` (see [Response format](https://docs.aggre.org/concepts/response-format.md)); each row of `data` follows the schema [`tickers_latest`](https://docs.aggre.org/api/schemas.md#tickers_latest).

**Errors**: `400`, `401`, `403`, `429`, `503`, in the shared envelope ([Errors](https://docs.aggre.org/concepts/errors.md)).
