Orders
Limit and market orders, expiry and reserved margin.
Each market has one central limit order book. Buy orders, called bids, and sell orders, called asks, rest on it by price. You trade by placing an order. Your wallet signs it, the matching engine matches it, and the contract settles the fill on Base.
The order ticket
| Field | What you choose |
|---|---|
| Side | Buy the long side or sell it. The ticket uses the payoff's words: Long and Short, Above and Below, Yes and No, In and Out. |
| Type | Limit or Market. |
| Price | For a limit order, the price per contract, from $0.01 to $10.00 in steps of $0.01. |
| Size | The number of contracts. The app calls one contract a lot. You can also enter an amount in dollars. |
| Expiry | For a limit order, how long it rests on the book. |
Under the fields, the ticket draws the payout of your order and shows its maximum loss, its maximum profit and its break-even price.
Limit orders
A limit order trades at your price or better.
- If an order on the other side already matches your price, your order fills at once, at the price of the resting order.
- If not, the rest of your order rests on the book until someone trades against it, you cancel it or it expires.
A limit order that rests on the book adds liquidity. Its owner is the maker. Use a limit order when the price matters more to you than the time.
Market orders
A market order trades now, at the best prices on the book. It fills against the resting orders from the best price outward. Any part that cannot fill at once is canceled. It never rests on the book. This behavior is called immediate or cancel, or IOC.
A market order has no price limit. If the book is thin, a large order can fill at several prices, and the average can be worse than the best price you saw. The ticket shows the estimated average price before you submit. The owner of a market order is the taker.
How long a limit order lives
| Expiry | Name | The order rests until |
|---|---|---|
| GTC | Good until canceled | You cancel it. The app keeps a GTC order for up to 24 hours. |
| GFD | Good for the day | The end of the day in your time zone. |
| GTD | Good until date | The date and time that you choose, up to 7 days ahead. |
An order only trades on its own market. When the cycle ends, that market stops trading. An order that did not fill does not move to the next cycle. To trade the next cycle, place a new order on it.
What an order reserves
A resting order reserves part of your balance, so that it can always settle if it fills:
- A buy order reserves its price × its size.
- A sell order reserves ($10 − its price) × its size.
You place a bid for 10 contracts at $4.00. It reserves $40.00. You also place an ask for 10 contracts at $6.00 on the same market. It would reserve $40.00 too. If both fill, the two positions net to zero, so the contract only ever needs one side. The account reserves $40.00 in total, not $80.00.
On one market, the account reserves the larger of the two sides, not the sum. The reserve shows as Reserved margin in your account. When you cancel an order, its reserve is free again at once.
The life of an order
Sign
Your wallet signs the order as an EIP-712 typed message. The message holds the market, the side, the price, the size and a unique number. It costs no gas.
Match
The matching engine checks the order and matches it by price, then time. You see the fill at once.
Settle
The executor posts the matched pair to the Scalar contract on Base. The contract checks both signatures, moves the collateral and records the positions.
Cancel an order
Cancel one order from the orders table, or all of your orders at once. A cancel costs no gas and frees the reserve at once. An order that already filled cannot be canceled. Close the position instead. See Positions and P&L.
Fees
Each fill can carry a trading fee for the maker and for the taker. The contract caps each fee at 5% of the trade's notional value, which is its price × its size. See Fees.