get_slippage
Simulates a specific trade size to calculate actual price impact and pool fees across live venues, excluding gas and multi-hop routing.
Instructions
Price impact for a SPECIFIC trade size — what a trade will actually get, which a spot price cannot tell you. Simulates the swap against live reserves on every venue. Price impact and the pool fee are reported separately. Pool-level only: excludes gas, MEV and multi-hop routing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | Pair as SYM/SYM. | |
| chain | No | Chain to query. Defaults to bsc. | |
| amountIn | No | Alternatively, size in units of the first token. Supplying either this or amountUsd is enough. | |
| amountUsd | No | Trade size in USD, e.g. 10000. Required unless amountIn is given instead — slippage is meaningless without a size. |