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.
/markets/{ticker}/candlesticksAuthorization
Optional — this operation also accepts unauthenticated requests.
UDX-Access-KeyAPI key · headerOpaque API key ID.
UDX-Access-TimestampAPI key · headerUnix time in milliseconds, within 30 seconds of server time.
UDX-Access-SignatureAPI key · headerStandard-base64 RSA-PSS/SHA-256 signature with a 32-byte salt.
AuthorizationBearer token (JWT) · headerBearer token for an active signed-in UDX user.
An authenticated request is metered against the member's read bucket and returns RateLimit headers; an unauthenticated request shares the public per-client limit.
Header parameters
UDX-VersionstringDated API version (YYYY-MM-DD).
tickerTickerrequiredThe market's ticker.
period_ended_afterstring<date-time>requiredOnly return periods ending after this instant.
period_ended_beforestring<date-time>requiredOnly return periods ending before this instant.
period_intervalstringrequiredCandlestick period length: 1m, 1h, or 1d.
1m1h1dlimitintegerMaximum number of items to return in one page.
pagestringOpaque token identifying the requested page.
sortstringField to sort candlesticks by.
period_ended_atorderstringSort direction. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.
ascdesc200A page of candlesticks for the market.
candlesticksCandlestick[]requiredOne page of candlesticks, oldest first.
Show propertiesHide properties
Candlestickperiod_ended_atstring<date-time>requiredWhen this Candlestick's aggregation period ends.
openstringFirst trade price in the period, in dollars.
highstringHighest trade price in the period, in dollars.
lowstringLowest trade price in the period, in dollars.
closestringLast trade price in the period, in dollars.
volumestringrequiredContracts traded during the period.
trade_countinteger<int64>requiredNumber of trades during the period.
next_page_urlNextPageURL | nullrequiredRoot-relative URL for the next page. Null when there are no more items.
400The request doesn't conform to this spec.
typestring<uri-reference>requiredA stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.
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.
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.
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
404No market with this ticker exists.
typestring<uri-reference>requiredA stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.
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.
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.
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
429The request rate was exceeded. An unauthenticated request shares the public per-client limit; an authenticated request is metered against the member's read bucket.
typestring<uri-reference>requiredA stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.
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.
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.
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
500Something went wrong on UDX's side.
typestring<uri-reference>requiredA stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.
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.
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.
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
503Request admission is unavailable.
typestring<uri-reference>requiredA stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.
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.
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.
instancestring<uri-reference>An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.
curl -X GET "https://api.underdogexchange.com/markets/UDX-EXAMPLE-MARKET/candlesticks?period_ended_after=2026-01-01T00%3A00%3A00.000000Z&period_ended_before=2026-01-31T23%3A59%3A59.000000Z&period_interval=1h" \
-H "UDX-Access-Key: API_KEY_ID" \
-H "UDX-Access-Timestamp: UNIX_MILLISECONDS" \
-H "UDX-Access-Signature: BASE64_SIGNATURE"{
"candlesticks": [
{
"period_ended_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
}{
"type": "urn:udx:problem:invalid-request-parameters",
"title": "Bad Request",
"status": 400,
"detail": "invalid request parameters",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"type": "urn:udx:problem:unknown-version",
"title": "Bad Request",
"status": 400,
"detail": "unknown UDX-Version \"1999-01-01\"; supported versions: 2026-07-15",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"type": "urn:udx:problem:market-not-found",
"title": "Not Found",
"status": 404,
"detail": "market 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"
}{
"type": "urn:udx:problem:member-rate-limit-exceeded",
"title": "Too Many Requests",
"status": 429,
"detail": "this member has temporarily exceeded its request rate",
"instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
}{
"type": "urn:udx:problem:internal-error",
"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"
}