> For the complete documentation index, see [llms.txt](https://docs.vigilan.market/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vigilan.market/vigilan-market/trading-and-order-management.md).

# Trading and Order Management

### The order book

The order book contains bids to buy and asks to sell. The spread is the difference between the best bid and best ask. Depth is the quantity available at different prices.

| Order type                 | Behavior                                             | Main consideration                              |
| -------------------------- | ---------------------------------------------------- | ----------------------------------------------- |
| Market order, when offered | Trades against available orders at executable prices | Final price and filled size depend on liquidity |
| Limit order                | Trades only at your limit price or better            | May remain unfilled or fill only partly         |

A large order may trade at several price levels. Review the order summary and distinguish a share count from a USDT spending amount.

### Matching and settlement

Orders are matched off-chain and settled through on-chain contracts. Matching and settlement are distinct: a trade is not final merely because the matching engine has found another order.

An individual settlement is atomic. The associated token and collateral transfers either execute together or do not execute. One order can fill through multiple settlements.

### Common order states

| State            | Meaning                                           |
| ---------------- | ------------------------------------------------- |
| Open             | Waiting for execution                             |
| Partially filled | Some quantity has executed                        |
| Filled           | The requested quantity has executed               |
| Cancelled        | The remaining order has been cancelled            |
| Expired          | The order is no longer valid under its time limit |

For a partially filled order, check the status of the remainder. It may remain open or be cancelled according to the order type. Cancelling an unfilled remainder does not reverse trades that have already settled.

### Exiting early

You can seek an early exit by selling your shares while trading is available. The position closes only to the extent that your sell order executes.

Realized net return equals sale proceeds minus the cost of the shares sold and applicable costs. An early sale also reduces the payout you could receive at resolution.
