DeFi
On-chain DEX liquidity depth + slippage curve with illiquidity verdict API
Measures a token's real on-chain DEX liquidity depth and slippage curve. Finds the token's main Uniswap-V2-style pool against WETH via the V2 factory getPair, reads getReserves over free public RPC, prices both sides in USD, and runs the constant-product AMM math to return total pool depth (USD), the pool-implied token price, and the price-impact/slippage for buying AND selling at $1k / $10k / $100k notionals — plus a 0-100 illiquidity score, a deep/adequate/thin/illiquid verdict, machine-readable reason codes, and a plain-English narrative. Distinct from a single-route swap quote: this is the full depth/slippage CURVE plus a liquidity-risk verdict. If no V2 pool exists it returns a clear no_v2_pool_found result, not an error. Answers 'How deep is this token's liquidity?', 'How much will a $10k trade slip?', 'Can I exit a $100k position without crashing the price?', 'Is this token's liquidity thin enough to rug?'.
https://x402.hexl.dev/v1/defi/dex-liquidity-depth{
"token": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
"chain": "ethereum"
}{
"token": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
"chain": "ethereum",
"result": "ok",
"pair": "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974",
"dex": "uniswap-v2-style",
"wethPriceUsd": 1769.74,
"reserves": {
"token": 60176.483121,
"weth": 272.82262,
"tokenUsd": 482825.1,
"wethUsd": 482825.1,
"totalUsd": 965650.21
},
"tokenPriceUsd": 8.023485,
"slippage": [
{
"tradeUsd": 1000,
"buyImpactPercent": 0.505,
"sellImpactPercent": 0.505
},
{
"tradeUsd": 10000,
"buyImpactPercent": 2.317,
"sellImpactPercent": 2.317
},
{
"tradeUsd": 100000,
"buyImpactPercent": 17.364,
"sellImpactPercent": 17.364
}
],
"illiquidityScore": 8,
"verdict": "deep",
"reasonCodes": [],
"narrative": "Deep liquidity: ~$965,650 total pool depth. A $10k trade slips ~2.317% to buy / ~2.317% to sell. Pool-implied price $8.023485. Large trades fill with low slippage.",
"disclaimer": "Heuristic liquidity-depth and constant-product slippage estimate from a single Uniswap-V2-style WETH pool's on-chain reserves. Ignores V3/concentrated-liquidity, other DEXes, multi-hop routes, and MEV. NOT financial advice; verify before trading at size.",
"checkedAt": "2026-06-04T14:56:15.357Z"
}{
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"type": "string",
"description": "0x-prefixed 40-hex ERC-20 token contract address."
},
"chain": {
"type": "string",
"enum": [
"ethereum",
"base"
],
"default": "ethereum",
"description": "Chain the token is deployed on."
}
},
"examples": [
{
"token": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
"chain": "ethereum"
}
]
}{
"type": "object",
"additionalProperties": true
}