DocsIntroduction

Order lifecycle

The path of an order from signature to settled balance.

Order path

YOURWALLETCONFIDENTIALEXECUTIONENGINEPUBLICCUSTODYSignReplyVerifysignature, nonce, expiryPrioritizeclass orderMatchmargin, price-timeCommitfinalsigned orderreply, once committedBatchnet totals only, latertimeWALLETCONFIDENTIALEXECUTIONENGINEPUBLICSignVerifysignature, noncePrioritizeclass orderMatchmargin, price-timeCommitfinalsignedReplyoncecommittednet, laterBatch
Everything between your signature and the reply happens inside the engine. You hear back once the fill is committed; custody later sees only net totals.

Accounts and agents

An account is a wallet address, with no signup and no fee. An owner can open sub-accounts, each with its own balance, positions, and request allowance, funded by transfers only the owner can sign. The owner approves agents, which are keys that act for the account within the permissions below. Each account has one unnamed agent, which the browser terminal uses as its session agent for up to 24 hours, plus up to three named API wallets with an optional expiry of up to 180 days. Each terminal login replaces the session agent, so a bot should run on a named API wallet (Trading API).

ActionOwnerAgent
Trade, set leverage and margin, read the accountYesYes
Withdraw, transfer, open sub-accountsYesNo
Stake, vault deposits, commit open interestYesNo
Approve or replace agentsYesNo

Execution priority

Requests arriving within each matching cycle apply in the five classes below, in arrival order within each class.

  1. Non-order actions such as deposits, withdrawals, transfers, leverage, and margin changes
  2. Cancels, scheduled cancels, and cancel-all included
  3. Post-only orders
  4. One step of the liquidation sweep, when one is due
  5. All other orders

A request that arrives after a cycle is full waits for the next cycle and is never refused for that reason. The AMM vault’s orders enter the same queue under the same rules (AMM vault).

Fill and acknowledgement rules

  • A resting order is re-checked against margin when it fills; an unfunded quote is canceled instead of filled.
  • A reply is sent only after the request is committed to disk; acknowledged state survives any restart.
  • The public feed publishes committed events only.

Settlement and withdrawal

Trading runs continuously and never waits on the chain. A withdrawal is checked against the owner’s own balance and margin and settles onchain to the owner’s wallet (Onchain settlement).

Subliquid docs · Last changed October 28, 2026