{"uid":"cap_GXl_mxNyRYqO3LeDhUk8H","slug":"unlockbot-swap-risk-api-05926fcf","name":"UnlockBot Swap Risk API","description":"Pay-per-call crypto risk data for AI agents over x402: pre-trade checks, token safety / honeypot screening, whale exchange flows, token unlock risk, wallet profiles. No API key, no signup: pay a few cents of USDC per call. Payment: x402 v2 exact scheme, USDC on Base mainnet (eip155:8453) to 0x21e4F3c6EcDb0F0CADC59511BF675B9BcBbeD304. Charged only on HTTP 200.","url":"https://8prtkj444ihx.hostc.app/swap-risk?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["chain","token","amount_usd"],"properties":{"chain":{"enum":["ethereum","base","arbitrum"],"type":"string","description":"EVM chain the token lives on"},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Token you buy or sell"},"amount_usd":{"type":"number","minimum":1,"description":"Trade size in USD"},"slippage_pct":{"type":"number","default":1,"maximum":50,"minimum":0.01,"description":"Your slippage tolerance %"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"chain":"ethereum","token":"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984","symbol":"UNI","amount_usd":50000,"pools_seen":30,"deepest_pool":{"dex":"uniswap","url":"https://dexscreener.com/ethereum/0x1d42064fc4beb5f8aaf85f4617ae8b3b5b8bd801","pair":"0x1d42064Fc4Beb5F8aAF85F4617AE8b3b5B8Bd801","liquidity_usd":13615639},"slippage_pct":3,"est_price_impact_pct":0.289,"est_attacker_cost_usd":156,"routable_liquidity_usd":34474101,"est_sandwich_profit_usd":446.69,"est_sandwich_extractable_usd":602.69},"endpoint":"/swap-risk"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NbtLqO87Gs0PvemFldtmX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns pre-trade swap risk analysis for a token on a given EVM chain, including liquidity depth, price impact, and sandwich attack exposure estimates.","exampleAgentPrompt":"Before I swap $50,000 worth of UNI on Ethereum with 1% slippage, can you run a pre-trade risk check — tell me the estimated price impact, sandwich attack exposure, and how deep the liquidity is?","exampleUseCases":[{"title":"Large DeFi trade safety check","prompt":"I'm about to buy $100,000 of ARB on Arbitrum with 0.5% slippage — can you check the swap risk first, including price impact and whether I'm likely to get sandwiched?"},{"title":"Memecoin liquidity screening","prompt":"Before I ape into this token at 0x6982508145454Ce325dDbE47a25d4ec3d2311933 on Ethereum with $5,000, can you check how liquid it is and what my estimated price impact would be at 2% slippage?"},{"title":"MEV cost estimation for algo trading","prompt":"I'm running a trading strategy that swaps $20,000 of USDC into WETH on Base — what's the estimated sandwich attacker profit and how much would it cost them to attack my trade at 1% slippage?"}],"resultDescription":"Returns a JSON object with: chain and token symbol, number of pools seen, the deepest liquidity pool (DEX, pair address, DexScreener URL, liquidity in USD), total routable liquidity in USD, estimated price impact percentage, estimated sandwich attack profit and extractable value in USD, and estimated attacker cost in USD. All figures are computed for the given trade size and slippage tolerance.","failureModes":["Token contract address not found on the specified chain — returns error or empty pools","Chain not supported (only ethereum, base, arbitrum accepted) — schema validation error","amount_usd below minimum of 1 — rejected by schema","Insufficient liquidity data for obscure or newly deployed tokens — may return low pool counts or incomplete estimates","Payment failure (non-200 response) — USDC charge does not apply","Network or upstream DEX data provider outage — service unavailable"],"whenToPreferThis":"Choose this endpoint when you need a fast, keyless pre-trade risk assessment for EVM token swaps — specifically when you need sandwich/MEV exposure quantification, not just a honeypot boolean. It excels for large trades (>$1,000) where price impact and attacker profitability matter. Prefer it over generic token screeners when you need numeric liquidity depth, pool-level detail, and sandwich cost modeling in a single call paid with a few cents of USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:32:58.655Z","isFirstParty":false,"canonicalSlug":"unlockbot-swap-risk-api-05926fcf"}