Overview
Posting an order places it on the SX Bet orderbook for takers to fill. This guide covers every field in the order payload, how to sign it, and how to handle the response.Order fields
Each order submitted toPOST /orders/new requires these fields:
| Field | Type | Description |
|---|---|---|
marketHash | string | The market you’re posting to. Get this from GET /markets/active or GET /markets/find |
maker | string | Your wallet address |
baseToken | string | The token this order is denominated in (e.g., USDC). See References for token addresses |
totalBetSize | string | Your maximum risk in base token units (Ethereum format). See Unit Conversion |
percentageOdds | string | The odds you the maker receive, in SX protocol format (implied * 10^20). Must be on the odds ladder |
expiry | number | Deprecated. Must always be 2209006800 |
apiExpiry | number | Unix timestamp (seconds) after which this order expires |
executor | string | The SX Bet exchange address. Get this from GET /metadata |
salt | string | A random number to differentiate otherwise identical orders |
isMakerBettingOutcomeOne | boolean | true if you’re betting on outcome one, false for outcome two |
signature | string | Your wallet signature over the order hash |
Understanding percentageOdds
This is the implied probability from your perspective as the maker. The taker gets the complementary odds on the opposite outcome:
percentageOdds = "52500000000000000000" (52.5% maker implied), the taker sees 47.5% implied odds on the opposite outcome.
See Odds Formats for conversions between implied, American, and decimal odds.
Understanding totalBetSize
This is the maximum amount of tokens you would put into the pot if the order is fully filled. It’s in Ethereum units — for USDC (6 decimals), "100000000" = 100 USDC.
A taker can partially fill your order. The remaining unfilled portion stays on the book.
The minimum maker order size is 10 USDC.
Example
Response
A successful response looks like this:| Status | Description |
|---|---|
OK | Order created successfully |
INSUFFICIENT_BALANCE | Insufficient maker token balance |
INVALID_MARKET | Non-unique marketHashes specified |
ORDERS_ALREADY_EXIST | The order already exists |
Common issues
Order rejected — odds not on ladder
YourpercentageOdds must land on the odds ladder (currently 0.125% intervals). See Odds Rounding for how to validate and round your odds.
Order rejected — exposure too high
Your total exposure per market hash (sum of totalBetSize - fillAmount across all open orders on that market hash) must stay under your wallet balance for that token. Cancel some orders or add funds.
Order rejected — betting not enabled
You need to approve theTokenTransferProxy contract for each token you trade. See Enabling Betting.
apiExpiry tips
- Set a reasonable expiry — orders left open indefinitely consume exposure
- For volatile markets, use shorter expiries (minutes) and repost
- For stable pre-game markets, longer expiries (hours) are fine
- The
expiryfield is deprecated and must always be2209006800
Related
Odds Rounding →
Validate and round odds to the ladder.
POST /orders/new →
Full API reference for the endpoint.
Unit Conversion →
Converting between raw values and human-readable amounts.
Latency & Server Locations →
Expected response times and co-location recommendations.
