{"uid":"cap_atai3YTYuqoM7gIrHnHzM","slug":"defi-shield-hazel-vercel-app-a7272669","name":"DeFi Shield Price Impact Estimator","description":"","url":"https://defi-shield-hazel.vercel.app/api/mev/price-impact","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"properties":{"direction":{"type":"string","description":"Trade direction: buy or sell"},"amount_usd":{"type":"number","description":"Trade amount in USD"},"token_address":{"type":"string","description":"Token address"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"direction":"sell","amount_usd":25000,"token_address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"response":{"formula":"impact% = amount_usd / (2 * pool_liquidity_usd) * 100","data_age":"2026-06-16T01:17:53.797Z","cache_ttl":300,"direction":"sell","pool_used":{"dex":"pulsex","base_token":"USDC","quote_token":"ATROPA","pair_address":"0xC636bfE0bAe34824380B4E26Bc34e4614e55e483"},"amount_usd":25000,"token_name":"USD Coin","token_symbol":"USDC","current_price":0.0008625,"token_address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","pool_liquidity":7152570.89,"effective_price":0.000860992678,"response_time_ms":11,"price_impact_percent":0.174762}},"exampleRequest":{"direction":"sell","amount_usd":25000,"token_address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YYXMHtMbH3LpWbIbvS0q3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates the price impact percentage of a buy or sell trade based on token pool liquidity on Uniswap","exampleAgentPrompt":"What's the estimated price impact if I buy $50,000 worth of USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) on Uniswap — will it move the price much?","exampleUseCases":null,"resultDescription":"Returns the price impact percentage, the formula used, current token price, effective execution price after impact, pool liquidity in USD, the specific DEX pool and pair used (e.g. Uniswap USDC/USDT), token name and symbol, data age, and cache TTL. For example, a $50k buy of USDC in a $22.6M pool yields roughly 0.11% price impact.","failureModes":["Token address not found or unsupported — no liquidity pool available","Invalid token address format — returns validation error","Pool liquidity data unavailable or stale","Unsupported trade direction value (must be 'buy' or 'sell')","Amount USD is zero or negative — computation error","Rate limit exceeded or payment not processed via x402"],"whenToPreferThis":"Use this endpoint when you need a fast, pre-trade estimate of price impact for a specific ERC-20 token trade, especially for large trades where slippage matters. Ideal for MEV-aware agents, DeFi trading bots, or portfolio managers that need to check market depth before executing a swap. Prefer this over generic slippage estimators when you need pool-specific data from Uniswap with explicit liquidity figures and effective price calculation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:30:45.034Z","isFirstParty":false}