{"uid":"cap_jdXoW1qBo3CYpycYerc3T","slug":"saferoute-trade-guard-2b9523ad","name":"SafeRoute Trade Guard","description":"Workflow automation, Stripe and API integration repair, and x402 payment diagnostics. Choose a fixed scope and review it before payment.","url":"https://api.usesaferoute.com/v1/trade-guard?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"enum":["USDC","WETH","EURC","CBETH","CBBTC","VIRTUAL","AERO"],"type":"string"},"from":{"enum":["USDC","WETH","EURC","CBETH","CBBTC","VIRTUAL","AERO"],"type":"string"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"intentId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","maxLength":128,"minLength":16},"referralCode":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","maxLength":64,"minLength":3},"executionMode":{"type":"string","const":"standard","default":"standard"},"sourceAgentId":{"type":"string","maxLength":128,"minLength":1}}},"responseSchema":{"type":"json","example":{"status":"ok","service":"safe_trade_guard"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.12","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.12/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_qZFnlll5-XOCTIKvKFcNW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.12","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes a protected Base DEX token swap with diagnostics and payment protection for a specified wallet and token pair","exampleAgentPrompt":"Use SafeRoute Trade Guard to swap 100 USDC to WETH for my wallet 0xAbCd1234...5678 — I want standard execution mode and here's my intentId: swap_abc123def456xyz.","exampleUseCases":[{"title":"Protected USDC to WETH swap","prompt":"Run a protected swap of 250 USDC into WETH for my wallet 0x1234abcd5678ef901234abcd5678ef901234abcd — use standard execution and my intentId is trade_guard_xyz789abc123def4."},{"title":"Agent-initiated cbBTC trade","prompt":"My agent needs to swap 0.01 cbBTC to USDC for wallet 0xdeadbeef1234567890deadbeef1234567890dead with intentId agentswap_cbbtc2usdc0001 and sourceAgentId my-defi-bot-v2 — run it in standard mode with trade guard protection."},{"title":"VIRTUAL to EURC conversion with referral","prompt":"Swap 500 VIRTUAL tokens to EURC for wallet 0xfeedface0000111122223333444455556666dead, use intentId virtualswap_eurc_0042abc99def and apply referral code SAFEFRIEND10 with standard execution."}],"resultDescription":"Returns a JSON object with a status field (e.g. 'ok') and a service identifier ('safe_trade_guard'), confirming whether the guarded swap was accepted and processed.","failureModes":["Invalid wallet address format (must be 0x + 40 hex chars)","intentId too short or too long (must be 16–128 alphanumeric chars)","Unsupported token pair in from/to enum","Amount not matching numeric pattern","Payment of 0.12 USDC not fulfilled via x402 protocol","referralCode outside allowed length or character set","sourceAgentId missing or blank when required"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to execute a real Base DEX token swap with built-in payment protection and x402 diagnostics, particularly when swap integrity, guarded execution, and per-trade auditability matter. Prefer it over raw DEX calls when you need structured intent tracking via intentId and agent-level attribution via sourceAgentId.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:34:38.364Z","isFirstParty":false,"canonicalSlug":"saferoute-trade-guard-2b9523ad"}