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.
Overview
Once an order is on the book, itsstatus, fillAmount, and pendingFillAmount fields tell you where it is in its lifecycle. This page is the reference for what each combination means and how transitions are reported on the active_orders and order_book WebSocket channels.
Order status reference
Orders can have one of three statuses:| Status | Meaning |
|---|---|
ACTIVE | Order is live and available to be filled |
INACTIVE | Order has been cancelled and is no longer available |
FILLED | Order has been fully filled |
Order fill precision
When an order is fully filled,fillAmount may be slightly less than totalBetSize due to on-chain arithmetic rounding. An order is considered fully filled — and will receive status: "FILLED" — when the remaining unfilled amount is within a small precision tolerance (~0.001% of totalBetSize).
WebSocket order update sequence
When a taker fills your order, you’ll receive the following sequence of updates on theactive_orders and order_book channels.
1. Fill in progress
status: "INACTIVE" with a non-zero pendingFillAmount. This does not mean the order was cancelled. The order is being held — no further fills will be accepted against it while it is pending.
2. Fill confirmed
FILLED. Note that fillAmount may be marginally less than totalBetSize (see Order fill precision).
Rarely, a pending fill is rejected on-chain. You’ll see a final update where pendingFillAmount returns to 0 without fillAmount increasing.
Order states
Readstatus and pendingFillAmount together to understand an order’s current state.
status | pendingFillAmount | Meaning |
|---|---|---|
ACTIVE | "0" | Live, no fill in progress |
ACTIVE | > "0" | Live, fill in progress |
INACTIVE | "0" | Cancelled, no fill in progress |
INACTIVE | > "0" | Fill in progress — either being held mid-confirmation, or the maker cancelled while a fill was in flight |
FILLED | "0" | Fully filled |
INACTIVE with a non-zero pendingFillAmount does not by itself tell you whether the maker cancelled or a fill is simply in flight. Both can be true at once — see below.
Cancelling an order with a pending fill
A maker can cancel an order after the betting delay has elapsed and the fill has been submitted to chain, but before the fill is confirmed. When this happens:- The order shows
status: "INACTIVE"(because you cancelled it) andpendingFillAmount > 0(because the fill is still in flight). - The pending fill may still confirm on-chain. If it does, the next update will show an updated
fillAmount— so a cancelled order can end up with a non-zero finalfillAmount. - Once the pending fill resolves on-chain,
pendingFillAmountreturns to"0"andfillAmountreflects whatever the on-chain settlement ended up being (which may be zero in the rare case that the pending fill was rejected). The order remainsINACTIVE.
pendingFills array on their response, listing any fills awaiting confirmation against the orders you just cancelled. Use this to know upfront which cancelled orders still have in-flight work.
Order auto-cancellation
Orders may be automatically cancelled (set toINACTIVE) by the exchange when the remaining unfilled size drops below the minimum taker amount. This can occur after a partial fill. The resulting INACTIVE update is indistinguishable in structure from a maker-initiated cancellation — both have pendingFillAmount: "0" once resolved.
Related
Order Management →
Subscribing to order updates, cancelling, and the heartbeat safety mechanism.
Active Order Updates →
WebSocket channel reference for a maker’s own orders.
Order Book Updates →
WebSocket channel reference for a market’s full order book.
Betting Delays →
Why there’s a delay between fill submission and on-chain confirmation.
