DeFi Data
Slippage Calculation (for Uniswap V2 and its forks)
To predict the amount of tokens required to reach a specified slippage, you can use Pool Slippage
endpoint. It works for any pool that exists on Uniswap V2 or any fork DEX on supported list of exchanges.
GET
The logic is as follows:
Provide the address of the pool, select a token in which you wish to have slippage calculated (e.g. if selected ETH from ETH-USDC, it will show how much is ETH is required to move the price by selected amount) and determine the goal for price movement.
Path Parameters
Name of the blockchain of the requested pool (e.g. Ethereum, Moonbeam, etc.)
Address of the requested pool
Address of either of the tokens in the pool
Type of the pool (e.g. UniswapV2)
Desired slippage in per mille (e.g. 100 will result in 10% slippage)