Get a Market's Order Book
Returns the current aggregated order book for a market.
/markets/{ticker}/orderbookAuthorization
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.
depthinteger<int32>Maximum number of price levels to return per side.
200The market's aggregated order book.
orderbookOrderbookrequiredThe aggregated order book for a market.
Show propertiesHide properties
tickerTickerrequiredA human-meaningful natural key naming a single-leg or multi-leg market.
bidsPriceLevel[]requiredBid levels, best first, as [price, quantity] pairs in YES dollars.
asksPriceLevel[]requiredAsk levels, best first, as [price, quantity] pairs in YES dollars.
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/orderbook" \
-H "UDX-Access-Key: API_KEY_ID" \
-H "UDX-Access-Timestamp: UNIX_MILLISECONDS" \
-H "UDX-Access-Signature: BASE64_SIGNATURE"{
"orderbook": {
"ticker": "UDX-EXAMPLE-MARKET",
"bids": [
[
"0.54",
"120"
],
[
"0.53",
"300"
]
],
"asks": [
[
"0.56",
"80"
],
[
"0.57",
"250"
]
]
}
}{
"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"
}