There are two ways to fetch odds depending on what you need:Documentation Index
Fetch the complete documentation index at: https://docs.sx.bet/llms.txt
Use this file to discover all available pages before exploring further.
| Endpoint | Use when |
|---|---|
GET /orders | You need the full orderbook — all active orders, sizes, and individual order details |
GET /orders/odds/best | You only need the current best price for each outcome |
All odds returned by the API are from the maker’s perspective. To get the taker odds on the opposite outcome, use:
takerOdds = 1 - percentageOdds / 10^20. For example, if a maker is asking for 51% on outcome 1, a taker gets outcome 2 at 49%.GET /orders
Use this when you need to inspect full order details — available sizes, fill status, or depth across both sides of a market. You can fetch orders for multiple markets at once, all orders for a specific event, or all orders posted by a specific maker address. See the full parameter reference →.Like the
percentageOdds value, totalBetSize and fillAmount are from the maker’s perspective. To calculate available taker liquidity, use: remainingTakerSpace = (totalBetSize - fillAmount) * 10^20 / percentageOdds - (totalBetSize - fillAmount)GET /orders/odds/best
Use this when you only need the best available price on each side — for example, to check odds before placing a fill (see Filling Orders) or to scan for value across a league. Note that this endpoint only returns the best price, not available liquidity at that price. If you need to know how much you can fill at those odds, useGET /orders to fetch the full orderbook. See the full parameter reference →.
Real-time best odds
Subscribe tobest_odds:global for live best-odds updates. Two things are specific to this channel:
- No server-side history — recovery is unavailable, so re-seed from REST on every connect (not just failed recovery).
- Field name differs between REST and WS — REST returns
outcomeOne/outcomeTwo; WS publications useisMakerBettingOutcomeOne. Map between them when seeding state.
updatedAt.
Real-time orderbook
Subscribe toorder_book:market_{marketHash} with positioned: true, recoverable: true. Two things are specific to this channel:
- History is enabled — Centrifugo replays missed publications on reconnect, so the subscribe-to-fetch race is handled automatically. No manual buffering needed unless you want belt-and-braces.
- REST seed uses
/orders?marketHashes={hash}— fetch only whenwasRecovering && recoveredis false.
Related
Real-time Data →
Full WebSocket guide: auth, connection, recovery, and channel reference.
Filling Orders →
Use best odds to find orders, then submit a fill.
Best Odds Payload →
Field-by-field reference for
best_odds:global messages.Order Book Payload →
Field-by-field reference for
order_book:* messages.