Skip to main content
Mainnet currently supports Spot DEX only. Perpetuals, Oracle, Margin Trading, Lending, and Vaults are Testnet-Only. Use Testnet endpoints and assets for those products.
Clearing is how an accepted order becomes a final balance change: funds are reserved, fills are applied, fees are charged, and unused funds are released.

What each confirmation means

Reservations and settlement

  1. Each product reserves something different. Spot holds the asset you pay. Margin Trading reserves Lending collateral. Perpetual orders use order margin.
  2. Only successful fills change balances. Matching first proposes a fill, then the product runs its settlement checks. If those checks reject it, no fill happens and no funds are credited.
  3. A cancel never reverses a fill. Canceling or expiring an order releases only the unfilled part.
On Spot, the amount you receive is rounded down to the smallest token unit on each fill. Many small fills can therefore credit slightly less than one calculation on the total.

PnL and balance changes

A Spot fill exchanges one asset for another. Closing a Perpetual position adds its realized PnL to your collateral. For example, closing 4 units of a long entered at 100 at a price of 120 realizes 4 * (120 - 100) = 80 in the quote currency, before fees and funding.