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

# Slippage Tolerance

> How slippage works and how to control it in Trading API requests

<Info>
  Slippage is the difference between the quoted price and
  the final execution price. On Solana, prices can move between quote and execution
  because transactions are processed in blocks and liquidity shifts rapidly. A
  higher tolerance increases execution probability; a lower tolerance tightens
  price protection.
</Info>

Builders have two options for slippage tolerance:

* **Auto slippage**: DFlow chooses the tolerance dynamically.
* **Custom slippage**: You set the tolerance explicitly.

## Auto Slippage Tolerance

With auto slippage, DFlow determines the optimal slippage based on market
conditions so trades have a high probability of success while maintaining price
protection.

To use auto slippage, set `slippageBps=auto` on either of the following API routes:

* [`GET /order`](/resources/trading-api/order/order)
* [`GET /intent`](/resources/trading-api/declarative/quote)

<Note>
  Auto slippage is calculated server-side by the DFlow Aggregator and updates
  continuously based on current onchain conditions.
</Note>

## Custom Slippage Tolerance

Custom slippage gives traders direct control over the maximum price deviation
they are willing to accept.

To use custom slippage, set `slippageBps` to a non-negative integer (u16) on either of the following API routes:

* [`GET /order`](/resources/trading-api/order/order)
* [`GET /intent`](/resources/trading-api/declarative/quote).

The value is in basis points (1 bp = 0.01%).

<Note>
  Setting slippage too low can cause trades to fail during high volatility or
  when liquidity is thin.
</Note>

## Sequence of Events

1. You set slippage tolerance (auto or custom).
2. You request an order or intent quote.
3. DFlow validates the execution price against your tolerance.
4. If the tolerance is met, the trade executes; otherwise it fails safely.

## API Routes

* [GET /order](/resources/trading-api/order/order)
* [GET /intent](/resources/trading-api/declarative/quote)
