dex.liquidity_slippage
Estimate DEX liquidity and trade slippage for a given trade size. Enter a pool or token address to see total USD liquidity, 24h volume, and slippage estimates at $1k/$5k/$10k tiers.
Instructions
Estimate DEX pool liquidity and trade slippage (GeckoTerminal): total USD
liquidity, 24h volume, an estimated slippage percentage for the given
trade size, and slippage_tiers at fixed $1k/$5k/$10k sizes. Approximated
under a documented constant-product (50:50) assumption since GeckoTerminal's
free API exposes only combined USD liquidity, not per-token reserves.
Use this before sizing a trade or comparing pools for a given token, to
check depth before swapping. Do NOT treat estimated_slippage_pct or
slippage_tiers as an exact on-chain quote, especially for concentrated-
liquidity or stableswap pools - always re-verify with a live quote before
executing. Requires exactly one of pool_address or token_address; passing
neither raises an "invalid_input" error.
Args:
trade_size_usd: Hypothetical trade size in USD.
network: GeckoTerminal network id, e.g. "base", "eth" (default "base").
pool_address: A specific pool contract address.
token_address: Token contract address (auto-picks the most liquid pool).
One of pool_address or token_address is required.
Returns:
On success: {"success": true, "total_liquidity_usd",
"estimated_slippage_pct", "slippage_tiers", ...}
On failure: {"success": false, "error": {"type", "message"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | base | |
| pool_address | No | ||
| token_address | No | ||
| trade_size_usd | Yes |