Matching.verifyAndMatch on Base, which checks both
signatures and moves the assets.
How a match happens
- You submit a signed order to
POST /v1/orders. It rests on the book. - The matcher polls the book several times a second. On each pass it takes the best crossed pair in each market, in price-time priority.
- The fill size is the smaller of the two remaining amounts. The fill price is the maker’s limit price.
- The execution service submits the fill on chain. Your order’s filled amount updates once the transaction settles.
Maker and taker
The order created later is the taker on each fill. The earlier one is the maker. If both were created at the same instant, the one with the higherorder_id is the taker. See
Fees for what this means for what you pay.
When a fill would revert
The matcher simulates each fill before it is sent. If the chain would refuse it, both orders stay on the book.- A refusal that depends on balances (for example, an account short of margin) is retried with backoff. Nothing is cancelled.
- A refusal that cannot change while both orders stay as they are skips that pair. Each order can
still fill against other orders. An order refused this way against three different subaccounts is
cancelled with
cancel_reason: "repeated_permanent_revert". - An order that can never settle as signed is cancelled with
cancel_reason: "unmatchable_signed_order".
Futures
The matcher skips a futures series while it is closed on chain: before it opens, afterlast_trade_time, or while its manager is paused. Before each futures fill it also checks:
- The fill price is inside the fill band.
- Each account adding risk has enough initial margin. See Pre-trade margin check.

