Skip to content
UDX
Esc
↑↓navigate↵open⌘Jpreview

Get a Market's Candlesticks

Returns historical OHLC (open/high/low/close) price candlesticks for a market over a time range, bucketed into fixed-duration periods.

GET/markets/{ticker}/candlesticks
Authorization

None. This operation accepts unauthenticated requests.

Path parameters
tickerTickerrequired
The market's ticker.
min length 1 · max length 128
Query parameters
period_ends_afterstring<date-time>required
Only return periods ending after this instant.
max length 40
period_ends_beforestring<date-time>required
Only return periods ending before this instant.
max length 40
period_intervalstringrequired
Candlestick period length: 1m, 1h, or 1d.
Allowed:1m1h1d
limitinteger
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.
min 1 · max 100 · default: 10
pagestring
Opaque token identifying the requested page. Clients should not construct or extract this value; follow next_page_url from the previous response unchanged instead.
max length 512
sortstring
Field to sort candlesticks by. Defaults to period_ends_at (period end).
default: "period_ends_at"
Allowed:period_ends_at
orderstring
Sort direction. Defaults to desc. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.
default: "desc"
Allowed:ascdesc
Header parameters
UDX-Versionstring
Dated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
max length 10
Responses
200A page of candlesticks for the market.
candlesticksCandlestick[]required
One page of candlesticks, oldest first.
max items 100
Show properties
Array of Candlestick
period_ends_atstring<date-time>required
When this Candlestick's aggregation period ends. UDX timestamps use RFC 3339; requests require an explicit UTC offset and zero to six fractional digits; responses use UTC with exactly six fractional digits.
max length 40
openobject
First trade price in the period, in dollars.
Show properties
object
highobject
Highest trade price in the period, in dollars.
Show properties
object
lowobject
Lowest trade price in the period, in dollars.
Show properties
object
closeobject
Last trade price in the period, in dollars.
Show properties
object
volumeobjectrequired
Contracts traded during the period.
Show properties
object
trade_countinteger<int64>required
Number of trades during the period.
next_page_urlNextPageURL | nullrequired
Root-relative URL for the next page, including the effective limit, sort, order, filters, and opaque cursor. Follow it unchanged with the same authentication. Null when there are no more items. It never contains credentials or an authority/host.
max length 4096 · matches ^/[^/\s#][^\s#]*$
400The request doesn't conform to this spec.
typestring<uri-reference>
A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequired
A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequired
The HTTP status code, repeated from the response itself.
detailstring
A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>
An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
404The requested resource doesn't exist or isn't visible to the caller.
typestring<uri-reference>
A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequired
A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequired
The HTTP status code, repeated from the response itself.
detailstring
A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>
An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
429The public request rate was exceeded. Wait for `Retry-After`.
typestring<uri-reference>
A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequired
A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequired
The HTTP status code, repeated from the response itself.
detailstring
A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>
An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
500Something went wrong on UDX's side.
typestring<uri-reference>
A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequired
A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequired
The HTTP status code, repeated from the response itself.
detailstring
A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>
An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
503Request admission is unavailable. Retry later.
typestring<uri-reference>
A stable URI identifying the error's general category. Usually absent (equivalent to "about:blank" per the RFC); documented rate controls use closed URN values so callers can distinguish same-status retry causes without parsing localized prose.
max length 2048
titlestringrequired
A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.
max length 40
statusintegerrequired
The HTTP status code, repeated from the response itself.
detailstring
A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.
max length 500
instancestring<uri-reference>
An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
max length 100
Request
curl -X GET "https://{hostname}/markets/UDX-EXAMPLE-MARKET/candlesticks?period_ends_after=2026-01-01T00%3A00%3A00.000000Z&period_ends_before=2026-01-31T23%3A59%3A59.000000Z&period_interval=1h"
Response
{
  "candlesticks": [
    {
      "period_ends_at": "2026-01-01T00:01:00.000000Z",
      "open": "0.54",
      "high": "0.56",
      "low": "0.53",
      "close": "0.55",
      "volume": "420",
      "trade_count": 12
    }
  ],
  "next_page_url": null
}