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

# Slippage & Price Protection

How your slippage limit is enforced, and what each refusal message means.

Every market order, TP/SL and other triggered order carries a slippage limit, and Imperial enforces it twice: at execution, and on-chain.

**Slippage** is the difference between the price you expect and the price you get. Bigger orders and thinner books mean more slippage.

### How your limit is enforced

1. **At execution.** The order goes out with a worst acceptable price at your limit, so it never fills beyond that.
2. **On-chain.** The Imperial program refuses any fill worse than your limit, whatever the app or API sent.

If the book can only fill part of your order inside the limit, the rest is cancelled. If nothing fills, the order is refused and your collateral is returned.

**Price improvement is yours.** If the fill is better than expected, you keep the difference.

### When an order can't trade

| You see                               | Meaning                                                                                                                                          |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Slippage exceeded**                 | The book moved beyond your limit before the order filled. Retry or widen your limit.                                                             |
| **Market closed**                     | The book is too far from the mark price to trade, usually because the underlying TradFi market is closed. Triggered orders stay armed and retry. |
| **Market halted**                     | Trading on this market is paused for a short time. See [Halts](https://docs.imperial.trade/margin-and-risk/halts.md).                            |
| **Size too large**                    | The order is above the largest size the market allows. Split it up.                                                                              |
| **No capacity**                       | Imperial can't open this size on this market right now. Try a smaller size or try again shortly. Closes are never affected.                      |
| **Order may still have gone through** | Confirmation was delayed. Check your positions before retrying. Imperial never sends a duplicate.                                                |
