Skip to main content

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, its status, 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:
StatusMeaning
ACTIVEOrder is live and available to be filled
INACTIVEOrder has been cancelled and is no longer available
FILLEDOrder 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).
Do not use fillAmount === totalBetSize to detect a fully filled order. Use status === "FILLED" instead.

WebSocket order update sequence

When a taker fills your order, you’ll receive the following sequence of updates on the active_orders and order_book channels. 1. Fill in progress
{
  "status": "INACTIVE",
  "fillAmount": "0",
  "pendingFillAmount": "2681511700",
  "totalBetSize": "2681520865"
}
When a fill that exhausts the remaining order size has been submitted but not yet confirmed on-chain, the order temporarily shows 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
{
  "status": "FILLED",
  "fillAmount": "2681511700",
  "pendingFillAmount": "0",
  "totalBetSize": "2681520865"
}
Once the fill is confirmed on-chain, the order transitions to 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

Read status and pendingFillAmount together to understand an order’s current state.
statuspendingFillAmountMeaning
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) and pendingFillAmount > 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 final fillAmount.
  • Once the pending fill resolves on-chain, pendingFillAmount returns to "0" and fillAmount reflects whatever the on-chain settlement ended up being (which may be zero in the rare case that the pending fill was rejected). The order remains INACTIVE.
The cancel endpoints also return a 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 to INACTIVE) 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.

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.
Last modified on May 19, 2026