Get a Market's Order Book
Returns the current aggregated order book (price levels) for a market, priced from the YES side.
GET
/markets/{ticker}/orderbookAuthorization
None. This operation accepts unauthenticated requests.
Path parameters
tickerTickerrequiredThe market's ticker.
min length 1 · max length 128
Query parameters
depthinteger<int32>Maximum number of price levels to return per side.
min 1 · max 1000
Header parameters
UDX-VersionstringDated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
max length 10
Responses
200The market's aggregated order book.
orderbookOrderbookrequiredThe aggregated order book for a market, priced from the YES side.
Show propertiesHide properties
tickerTickerrequiredA market identifier (ticker) — a human-meaningful natural-key symbol, not a UUID. Unique per market.
min length 1 · max length 128
bidsPriceLevel[]requiredBid levels, best first, as `[price, quantity]` pairs in YES dollars.
max items 1000
asksPriceLevel[]requiredAsk levels, best first, as `[price, quantity]` pairs in YES dollars.
max items 1000
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/orderbook"const response = await fetch("https://{hostname}/markets/UDX-EXAMPLE-MARKET/orderbook", {
method: "GET"
});import requests
response = requests.get(
"https://{hostname}/markets/UDX-EXAMPLE-MARKET/orderbook",
)Response
{
"orderbook": {
"ticker": "UDX-EXAMPLE-MARKET",
"bids": [
[
"0.54",
"120"
],
[
"0.53",
"300"
]
],
"asks": [
[
"0.56",
"80"
],
[
"0.57",
"250"
]
]
}
}{
"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"
}