> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outcome.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Order lifecycle: submission, matching, fills, and cancels

This page covers what happens to your order from the moment you submit it until it's filled or cancelled.

### Submitting an order

When you confirm an order on [outcome.xyz](http://outcome.xyz), it goes to the matching engine. Submission is near-instant, and the engine checks your order against the current state of the book.

If the order can fill at the price you've set (or better), it fills immediately. If it can't, it rests on the book at the price you specified.

### Resting on the book

An order that rests stays open on the book at its specified price. Other traders see it as part of the bid or ask stack. The order continues to rest until one of three things happens:

* Another trader takes the order (filling it).
* You cancel it.
* The market reaches its resolution time, at which point any open orders are cancelled automatically.

There's no time limit on how long a resting order stays open. If you place a limit order at 30 cents and the market trades at 50 cents for the next 12 hours, your order is still sitting there at 30 cents.

### Matching and filling

When a new order arrives that crosses the best price on the opposite side, the matching engine pairs it with the resting order. The resting order is the **maker** (it was there first) and the incoming order is the **taker**.

Fills happen at the maker's price, not the taker's. If you have a limit buy at 40 cents and someone submits a market sell, your buy fills at 40 cents, even if they would have accepted less.

### Partial fills

If your order is larger than the volume available at your price, it can partially fill. The portion that has a matching counterparty fills immediately. The rest continues to rest on the book.

A limit buy of 1,000 tokens at 40 cents with only 600 tokens available to sell at 40 cents fills 600 immediately. The remaining 400 stays on the book at 40 cents, waiting for more sellers.

Market orders can also partially fill if the book runs out of liquidity before your full size is satisfied. In that case, the unfilled portion is cancelled, since market orders don't rest on the book.

### Cancelling an order

You can cancel any open or partially-filled order at any time before it fully fills. Cancelling removes the remaining unfilled portion from the book.

Cancelling has no fee and is generally instant. However, if a fill arrives at the same moment you cancel, the fill may execute before the cancellation is processed. In that case, the filled portion is yours; only the unfilled remainder is cancelled.

### Slippage on market orders

When a market order walks through multiple price levels of the book, the average price you pay can differ significantly from the best price you saw before submitting. This is **slippage**.

Slippage is most pronounced in thin markets or when submitting a large order. For example, a market buy of 1,000 tokens with 100 at 40 cents, 200 at 41 cents, and 700 at 43 cents results in an average fill price of around 42.3 cents. The best price on screen (40 cents) was only the starting point.

To avoid slippage, use a limit order with a price you're willing to accept as your worst-case fill. See [Order types](05b-order-types.md) for the difference between limit and market orders.
