{"uid":"cap_i9zn2TiXtrralbXDRMGPU","slug":"saferoute-swap-safety-check-74ed765a","name":"SafeRoute Swap Safety Check","description":"Check whether an approved Base token swap is eligible before supplying a wallet. Returns verified token contracts, indicative output, liquidity sources, fee estimate, warnings, and the exact next action. No custody, signing, or execution.","url":"https://api.usesaferoute.com/v1/swap-safety-check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"enum":["USDC","WETH","EURC","CBETH","CBBTC","VIRTUAL","AERO"],"type":"string","description":"Approved Base buy-token symbol; must differ from from"},"from":{"enum":["USDC","WETH","EURC","CBETH","CBBTC","VIRTUAL","AERO"],"type":"string","description":"Approved Base sell-token symbol"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$","description":"Human-readable sell amount, capped at $500 USDC equivalent"},"intentId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","maxLength":128,"minLength":16},"referralCode":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","maxLength":64,"minLength":3},"sourceAgentId":{"type":"string","maxLength":128,"minLength":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KLGOd1OiamV0hZ2q-KSxb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pre-flight eligibility check for a Base DEX token swap — returns verified contracts, indicative output, liquidity sources, fee estimate, warnings, and the next required action without executing or signing anything.","exampleAgentPrompt":"Before I swap 200 USDC for WETH on Base, run a SafeRoute safety check — I want to see the verified contracts, expected output, any warnings, and what the fees will be before I commit to anything.","exampleUseCases":[{"title":"Pre-trade safety check for DeFi bot","prompt":"Before my trading bot swaps 500 USDC into cbBTC on Base, run a swap safety check so I can see the indicative output, liquidity sources, and any contract warnings first."},{"title":"Agent wallet risk review before swap","prompt":"I'm about to swap 50 WETH to USDC — can you do a safety check on that trade so I know the estimated fees, verified token contracts, and whether there are any red flags before my wallet signs anything?"},{"title":"DeFi yield rebalancer pre-flight","prompt":"My rebalancing strategy needs to swap 300 EURC into AERO on Base — check if that swap is eligible and safe, and tell me the indicative output amount and any warnings before we proceed."}],"resultDescription":"A structured response containing: verified smart contract addresses for both tokens, an indicative output amount the user would receive, identified liquidity sources routing the swap, an estimated fee breakdown, any risk warnings (e.g. low liquidity, suspicious contracts), and the exact next action the caller should take — all without any signing, custody, or trade execution.","failureModes":["Invalid or non-whitelisted token symbol returns validation error","Sell amount exceeding $500 USDC equivalent cap rejected","from and to tokens are the same symbol — rejected by enum constraint","intentId not meeting length or character pattern requirements","Amount string not matching numeric pattern returns schema error","Service unavailable or liquidity data temporarily inaccessible"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to validate and risk-check a Base DEX swap before committing a wallet signature — particularly when operating with user funds and requiring verified contract addresses, fee transparency, and explicit warnings. It is a read-only pre-flight check ideal for agentic workflows that enforce a human-in-the-loop approval gate or automated risk threshold before execution. Prefer this over executing a swap directly when trust, safety, and auditability matter, and when the swap involves any of the seven approved Base tokens (USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, AERO).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:30:56.215Z","isFirstParty":false}