AMM orders
AMM orders execute instantly at the calculated price.CLOB orders
CLOB orders support different execution strategies through time-in-force options.Time-in-force options
- GTC (Good Till Cancel) — stays on the book until filled or manually cancelled. Default for limit orders.
- FAK (Fill and Kill) — execute as much as possible immediately, cancel any unfilled portion.
- FOK (Fill or Kill) — execute entirely or cancel completely. No partial fills.
- GTD (Good Till Date) — remains active until a specified expiry time.
Order types
- Limit orders — specify the max price you’ll pay (buy) or min price you’ll accept (sell). Execute at your price or better.
- Market orders — execute immediately at the best available price.
Order statuses
- pending — order received and being validated.
- open — active on the book, waiting for matches.
- partial_filled — some shares executed, remainder still on book (GTC/GTD only).
- filled — completely executed.
- cancelled — cancelled by user or system.
- rejected — failed validation.
- expired — GTD order reached expiry time without filling.
Amending an open order
CLOB orders inopen or partial_filled status can have their price, their size, or both mutated in place via batch amend. The order keeps its identity (orderId stays the same) and its current filledSize — the new size is the new TOTAL, so the new remaining becomes newSize − filledSize.
- Independently optional fields — supply
newPriceonly,newSizeonly, or both. The omitted field keeps its current value. Items with neither field are rejected withBAD_REQUEST. - Time priority — preserved when the new
(price, size)is unchanged or shrunk at the same price level. A price move (up or down) puts the order at the new tail of the new level, identical to a cancel-and-replace. - Funding — BID amends that grow the lock check wallet balance; ASK amends that grow the lock check the user’s free share balance. Either can be rejected per-item with
INSUFFICIENT_BALANCEorINSUFFICIENT_SHARES. - Self-trade prevention — fixed server policy: any same-user resting crosser at the new price is auto-cancelled (
CANCEL_OLDEST). The order’s restingstpModeset at placement governs matching, not amend. Crossers being amended in the same batch are skipped (no self-cancel). If you want an amend to fail rather than cancel a crosser, cancel + re-place instead. - Terminal orders — amend is rejected with
NOT_FOUNDonce the order reachesfilled,cancelled,expired, orrejected. - AMM orders — cannot be amended; cancel and re-place to change price/size.