{"uid":"cap_K0ZiKByZP3OXwYq4jHvyg","slug":"beggar-bot-swap-build-base-mainnet-4367b0ea","name":"Beggar Bot Swap Build (Base Mainnet)","description":"Paid: /v1/verify, /v1/risk, /v1/receipt cost $0.01 USDC per call on Base mainnet via x402 (payTo 0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7); utilities analyze Base mainnet (USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) by default, network=base-sepolia optional; /v1/receipt/verify and discovery files are free. Operator: Beggar Bot.","url":"https://beggar-bot-demand.beggarbot.workers.dev/v1/swapbuild?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"properties":{"type":"string"}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZsUSlGKcdGgPbzLUv5lrV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds a swap transaction on Base mainnet, returning swap parameters or calldata for execution by an agent or wallet.","exampleAgentPrompt":"Build me a swap transaction on Base mainnet to exchange 50 USDC for ETH — give me the calldata I need to execute it onchain.","exampleUseCases":[{"title":"Agent-driven USDC to ETH swap","prompt":"I want to swap 100 USDC for ETH on Base mainnet — can you build the swap transaction so I can sign and submit it?"},{"title":"DeFi bot token rebalancing","prompt":"Build a swap from USDC to WETH on Base mainnet for 250 USDC so my portfolio rebalancing bot can execute the trade."},{"title":"Test swap on Base Sepolia","prompt":"Build me a test swap transaction on Base Sepolia — I want to swap 10 USDC for another token to verify my agent's execution flow before going live."}],"resultDescription":"Returns JSON containing swap transaction calldata, token addresses, amounts, routing details, and any other parameters needed to submit the swap transaction on Base mainnet (or Base Sepolia if specified).","failureModes":["Invalid or missing swap parameters returns an error response","Insufficient payment (less than $0.02 USDC via x402) results in a 402 Payment Required response","Unsupported token pair returns an error or empty result","Network mismatch or invalid network parameter causes a failure","Rate limiting or quota exhaustion on the Cloudflare Worker may cause 429 errors"],"whenToPreferThis":"Choose this endpoint when you need to programmatically build swap transaction calldata for Base mainnet (or Base Sepolia for testing) using a pay-per-call x402 micropayment model, without needing to maintain a persistent API key or subscription. Useful for AI agents that need to construct DeFi swap transactions on demand without operating their own routing infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-23T18:44:30.116Z","isFirstParty":false,"canonicalSlug":"beggar-bot-swap-build-base-mainnet-4367b0ea"}