Skip to content
UDX
2026-07-15

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
Authorization

Optional — this operation also accepts unauthenticated requests.

UDX-Access-KeyAPI key · header

Opaque API key ID.

UDX-Access-TimestampAPI key · header

Unix time in milliseconds, within 30 seconds of server time.

UDX-Access-SignatureAPI key · header

Standard-base64 RSA-PSS/SHA-256 signature with a 32-byte salt.

or
AuthorizationBearer token (JWT) · header

Bearer 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
Header parameters
UDX-Versionstring

Dated API version (YYYY-MM-DD).

min length 10 · max length 10
Path parameters
tickerTickerrequired

The market's ticker.

min length 1 · max length 128
Query parameters
period_ended_afterstring<date-time>required

Only return periods ending after this instant.

max length 40
period_ended_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.

min 1 · max 100 · default: 10
pagestring

Opaque token identifying the requested page.

max length 512
sortstring

Field to sort candlesticks by.

default: "period_ended_at"
Allowed:period_ended_at
orderstring

Sort direction. Applies to the default sort field when sort is omitted. Nulls sort last in both directions.

default: "desc"
Allowed:ascdesc
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_ended_atstring<date-time>required

When this Candlestick's aggregation period ends.

max length 40
openstring

First trade price in the period, in dollars.

max length 24 · matches ^[0-9]+(\.[0-9]{1,6})?$
highstring

Highest trade price in the period, in dollars.

max length 24 · matches ^[0-9]+(\.[0-9]{1,6})?$
lowstring

Lowest trade price in the period, in dollars.

max length 24 · matches ^[0-9]+(\.[0-9]{1,6})?$
closestring

Last trade price in the period, in dollars.

max length 24 · matches ^[0-9]+(\.[0-9]{1,6})?$
volumestringrequired

Contracts traded during the period.

max length 24 · matches ^[0-9]+(\.[0-9]{1,2})?$
trade_countinteger<int64>required

Number of trades during the period.

next_page_urlNextPageURL | nullrequired

Root-relative URL for the next page. Null when there are no more items.

max length 4096 · matches ^/[^/\s#][^\s#]*$
400The request doesn't conform to this spec.
typestring<uri-reference>required

A 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.

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
404No market with this ticker exists.
typestring<uri-reference>required

A 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.

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 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>required

A 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.

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>required

A 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.

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.
typestring<uri-reference>required

A 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.

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://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"
Response
{
  "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
}