Skip to main content

What is the orderbook?

The orderbook is the collection of all active, unfilled orders for a given market. Every order in the book is a maker’s open ask to bet on a specific outcome at specific odds. When you fetch orders from the API, you’re reading the live orderbook from the maker’s perspective.
Orders on the SX Bet API are always from the maker’s perspective.

Reading an order

Each order in the API response contains:
The critical fields for understanding an order:
FieldWhat it tells you
marketHashThe market this order belongs to
isMakerBettingOutcomeOneWhich side the maker is on (true = backing outcome 1, false = outcome 2)
percentageOddsThe maker’s implied odds — divide by 10^20 to get a decimal (e.g. 0.51 = 51%)
totalBetSizeThe maker’s total stake (USDC, 6 decimals)
fillAmountAlready filled portion — available = totalBetSize - fillAmount

Converting Odds to Taker’s Perspective

To bet on outcome 1 as a taker, you need to find orders where the maker is betting on outcome 2 — because you’re taking the other side. The isMakerBettingOutcomeOne field tells you which side a maker has taken:
isMakerBettingOutcomeOneMaker is betting onYou can use this order to bet on
trueOutcome 1Outcome 2
falseOutcome 2Outcome 1
Let’s take a real market — Cleveland Cavaliers vs Boston Celtics (moneyline) — and trace how raw maker orders from the API become the taker orderbook you see on sx.bet.
  • Outcome 1 = Cleveland Cavaliers
  • Outcome 2 = Boston Celtics

Step 1: Raw maker orders from GET /orders

Each row is labeled so you can trace it into the taker orderbook below.
makertotalBetSizepercentageOddsisMakerBettingOutcomeOne
A0x5B34…eb4275899000042000000000000000000false
B0xcFF3…32b53000000046000000000000000000false
C0xDFd1…530483677661846000000000000000000false
D0x740d…1D8429218750046750000000000000000false
E0xDFd1…530461606060850000000000000000000true
F0xcFF3…32b79900000051500000000000000000true
G0x5B34…eb4299965000052000000000000000000true
H0xcFF3…32b75200000052000000000000000000true

Step 2: What the taker sees on sx.bet

Those maker orders create the following orderbook for takers. The taker’s price = 1 - (percentageOdds / 10^20). Best taker odds are at the top.
Outcome 1
Cleveland Cavaliers
SizeTaker Price
D$292.1953.25¢
B$530.0054.0¢
C$4,836.7854.0¢
A$758.9958.0¢
Outcome 2
Boston Celtics
SizeTaker Price
G$999.6548.0¢
H$752.0048.0¢
F$799.0048.5¢
E$4,616.0650.0¢

Converting Maker Bet Sizes to Available Liquidity

Like percentageOdds, totalBetSize and fillAmount for a given order are from the maker’s perspective. To find how much liquidity is available for a taker to fill, you will need to convert the remaining maker space (totalBetSize - fillAmount) into taker space.

The formula

On any given bet, the maker’s stake and the taker’s stake together form the total payout pool. The maker posts an order at their implied odds (percentageOdds / 10^20), so the total pot for any filled amount is makerStake / makerOdds. The taker’s maximum stake is that total pot minus the maker’s stake.

Example

So while 6.00 USDC of maker stake remains, a taker can fill up to ~5.43 USDC on the other side.

In code

Last modified on March 24, 2026