---
search:
  tags:
    - Markets
    - GET
seo:
  description: >-
    Returns historical OHLC (open/high/low/close) price candlesticks for a…
    Reference for the GET /markets/{ticker}/candlesticks endpoint in the REST
    API API.
sidebar:
  badge: GET
  label: Get a Market's Candlesticks
title: Get a Market's Candlesticks
type: openapi-operation
---
Returns historical OHLC (open/high/low/close) price candlesticks for a market over a time range, bucketed into fixed-duration periods.

### Endpoint

- Method and path: `GET /markets/{ticker}/candlesticks`
- Operation ID: `getMarketCandlesticks`
- API reference: [GET /markets/{ticker}/candlesticks](/api-reference/markets/getmarketcandlesticks)

#### Authorization

- Credential: none
- Details: [Authentication](/authentication)

#### Parameters

- `UDX-Version` (`header`) — Dated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
- `ticker` (`path`, required) — The market's ticker.
- `period_ends_after` (`query`, required) — Only return periods ending after this instant.
- `period_ends_before` (`query`, required) — Only return periods ending before this instant.
- `period_interval` (`query`, required) — Candlestick period length: 1m, 1h, or 1d.
- `limit` (`query`) — Maximum number of items to return in one page. Defaults to 10 when omitted; must be an integer from 1 to 100. A value outside that range is rejected with 400 rather than silently clamped. A returned next_page_url preserves the effective value.
- `page` (`query`) — Opaque token identifying the requested page. Clients should not construct or extract this value; follow next_page_url from the previous response unchanged instead.
- `sort` (`query`) — Field to sort candlesticks by. Defaults to period_ends_at (period end).
- `order` (`query`) — Sort direction. Defaults to desc. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.

#### Responses

- `200` — A page of candlesticks for the market.
- `400` — The request doesn't conform to this spec.
- `404` — The requested resource doesn't exist or isn't visible to the caller.
- `429` — The public request rate was exceeded. Wait for `Retry-After`.
- `500` — Something went wrong on UDX's side.
- `503` — Request admission is unavailable. Retry later.
