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}/candlesticksAuthorization
None. This operation accepts unauthenticated requests.
Path parameters
tickerTickerrequiredThe market's ticker.
min length 1 · max length 128
Query parameters
period_ends_afterstring<date-time>requiredOnly return periods ending after this instant.
max length 40
period_ends_beforestring<date-time>requiredOnly return periods ending before this instant.
max length 40
period_intervalstringrequiredCandlestick period length: 1m, 1h, or 1d.
Allowed:
1m1h1dlimitintegerMaximum 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
pagestringOpaque 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
sortstringField to sort candlesticks by. Defaults to period_ends_at (period end).
default: "period_ends_at"
Allowed:
period_ends_atorderstringSort direction. Defaults to desc. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.
default: "desc"
Allowed:
ascdescHeader parameters
UDX-VersionstringDated 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[]requiredOne page of candlesticks, oldest first.
max items 100
Show propertiesHide properties
Array of
Candlestickperiod_ends_atstring<date-time>requiredWhen 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
openobjectFirst trade price in the period, in dollars.
Show propertiesHide properties
objecthighobjectHighest trade price in the period, in dollars.
Show propertiesHide properties
objectlowobjectLowest trade price in the period, in dollars.
Show propertiesHide properties
objectcloseobjectLast trade price in the period, in dollars.
Show propertiesHide properties
objectvolumeobjectrequiredContracts traded during the period.
Show propertiesHide properties
objecttrade_countinteger<int64>requiredNumber of trades during the period.
next_page_urlNextPageURL | nullrequiredRoot-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
titlestringrequiredA 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
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA 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
titlestringrequiredA 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
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA 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
titlestringrequiredA 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
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA 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
titlestringrequiredA 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
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA 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
titlestringrequiredA 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
statusintegerrequiredThe HTTP status code, repeated from the response itself.
detailstringA 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"const response = await fetch("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", {
method: "GET"
});import requests
response = requests.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
}{
"title": "Bad Request",
"status": 400,
"detail": "request did not pass validation",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Not Found",
"status": 404,
"detail": "not found",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"type": "urn:udx:problem:unauthenticated-rate-limit-exceeded",
"title": "Too Many Requests",
"status": 429,
"detail": "this client has temporarily exceeded the public request rate",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"title": "Internal Server Error",
"status": 500,
"detail": "internal error",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"type": "urn:udx:problem:request-admission-unavailable",
"title": "Service Unavailable",
"status": 503,
"detail": "request admission is temporarily unavailable",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}