Skip to content

Order lifecycle

Source and verification
Owning repository
bitcoinuniverseio/stampdex (private application source)
Source path
orders module, OrderStatus enum, order expiry crons
Applicable release
continuous deployment, verify with GET /api/version
Chain and network
bitcoin / mainnet
Lifecycle
stable
Last verified
2026-09-01
This page
Edit on GitHub · Bitcoin Universe platform

An order is not a request that either succeeds or fails. It is a state machine, and every state has a name the product shows you, a meaning, and a place where the money is. This page draws the machine.

The SRC-20 order state machine on StampDEX Seven states run left to right along the top. Draft becomes Open when the seller signs. Open becomes Pending when a buyer locks the listing. Pending becomes Awaiting transfer when the buyer pays, and if the buyer stops, the lock lapses and the order returns to Open. Awaiting transfer becomes Settling when the payment confirms, Settling becomes Awaiting confirmation when the token transfer is broadcast, and two confirmations make it Filled. Three terminal states sit on a second row: Expired below Draft, reached when an unsigned listing runs out of time; Cancelled below Open, reached when the seller signs a cancellation; and Failed below Settling, reached when the token balance cannot be verified, with the buyer's BTC still held in the listing escrow. seller signs buyer locks buyer pays payment confirms transfer broadcast 2 confirmations never signed seller signs a cancel balance not verified lock lapses, back on the book DRAFT not signed yet OPEN on the book PENDING buyer holds BTC AWAITING TRANSFER BTC in escrow SETTLING BTC in escrow AWAITING CONF. BTC in escrow FILLED both sides paid EXPIRED nothing moved CANCELLED tokens returned FAILED BTC held in escrow
Colour says where the BTC is, and nothing else. Purple is the per-listing escrow StampDEX controls. Failed is purple for the same reason Settling is: the money is in the same place. Failed is not a state where funds vanish, it is a state where they stop moving.
StateWhat happenedWho can act
DraftThe listing is prepared but the seller has not signed it. Buyers never see itThe seller, by signing
OpenThe listing is live on the book at its exact amount and priceAny buyer, or the seller by cancelling
PendingA buyer locked the listing and is paying. The lock releases by itself if the buyer stopsThat one buyer
Awaiting transferThe payment is broadcast. StampDEX waits for confirmation and an index checkNobody. Bitcoin decides
SettlingThe settlement worker is verifying the balance and broadcasting the token transferNobody
Awaiting confirmationThe token transfer is broadcast and needs one confirmationNobody
FilledSettled. Buyer has the tokens, seller has the proceedsNobody. It is done
CancelledThe seller cancelled before a saleNobody
ExpiredThe listing, or a buyer’s lock, ran out of timeNobody
FailedThe payment confirmed but the token balance could not be verified. Funds are held in escrowAn operator

Pending goes back to Open. A buyer who locks a listing and then walks away does not freeze it. The lock lapses and the listing returns to the book. Neither side lost anything, and the seller does nothing.

Open does not become Open at a new price. There is no price edit. Changing a price means Cancelled plus a new Draft, both signed by you. The registry records this explicitly for both protocols: listings must be cancelled and relisted, because no atomic listing update is implemented. See Change a listing price.

Failed is not the end of the money. It is the machine refusing to release funds against a balance it could not verify. See Recovery.

Terminal window
curl "https://stamp.api.bitcoinuniverse.io/api/v1/orders?tick=SEX&status=open"

Every order carries its status, and priceSatsPerToken * amount always equals totalPriceSats. The API refuses to serve a listing whose stored numbers disagree, so a listing you can read is a listing whose arithmetic holds. See Orders endpoints.