{"uid":"cap_Z5R0uZzKCgQmc5g9vf62x","slug":"tollbooth-swap-build-12492393","name":"Tollbooth Swap Build","description":"Non-custodial swap execution for AI agents on 8 chains: Solana (Jupiter) plus Base, Ethereum, Arbitrum, Polygon, Optimism, BSC and Avalanche (0x). Pay a small toll to get an unsigned, fee-inclusive swap transaction and an HMAC-signed receipt for auditing. Comparison-shop first with free indicative quotes at GET /v1/quote (same parameters, no taker required). You sign and submit with your own wallet - Tollbooth never touches keys or funds.","url":"https://api.tollboothswap.xyz/v1/swap/build?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"chain":{"enum":["solana","base","ethereum","arbitrum","polygon","optimism","bsc","avalanche"],"type":"string","description":"Chain to swap on"},"taker":{"type":"string","description":"Wallet address that will sign and send the swap"},"amount":{"type":"string","description":"Sell amount as an integer string in the input token's base units"},"inputToken":{"type":"string","description":"Token being sold: mint address (solana) or ERC-20 address (EVM chains)"},"outputToken":{"type":"string","description":"Token being bought: mint address (solana) or ERC-20 address (EVM chains)"},"slippageBps":{"type":"integer","description":"Max slippage in basis points (default 100)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":1,"rating":{"score":"0.25","successRate":"1.00","reviews":1,"stars":"2.0","state":"rated"},"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_VOwBF5ACZHRnIoW4GChwE","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":"Builds an unsigned, fee-inclusive swap transaction on Solana (via Jupiter) or Base (via 0x) for a given wallet to sign and submit, plus returns an HMAC-signed receipt for auditing.","exampleAgentPrompt":"Build me a non-custodial swap transaction on Solana to sell 1000000 USDC (mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) for SOL using my wallet 7xKX...abc with a max slippage of 50 basis points — I'll sign and send it myself.","exampleUseCases":[{"title":"Agent DeFi portfolio rebalancing","prompt":"Build me an unsigned swap transaction on Base to sell 500000000 USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for WETH (0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) using my wallet 0xABCD...1234 with 100 bps slippage — I'll handle signing myself."},{"title":"Solana agent treasury swap","prompt":"I need a Jupiter-routed swap transaction on Solana to exchange 5000000000 lamports worth of SOL for BONK tokens using my wallet 8zFa...XYZ, with a slippage cap of 200 basis points."},{"title":"Auditable cross-token trade with receipt","prompt":"Build me a swap on Base for my agent wallet 0xDEAD...BEEF — selling 1000000000000000000 WETH for USDC with 75 bps max slippage, and I need the HMAC-signed receipt for our audit trail."}],"resultDescription":"Returns an unsigned swap transaction payload ready for the taker to sign and submit, routed optimally via Jupiter (Solana) or 0x (Base), with all fees included in the transaction. Also returns an HMAC-signed receipt containing swap metadata for auditing purposes.","failureModes":["Invalid or unsupported token address for the specified chain — returns error indicating unrecognized token","Insufficient liquidity for the requested swap size — route not found","Taker wallet address is malformed or mismatched with chain format","Amount is zero or below minimum — rejected before routing","Slippage tolerance too tight — no route fits within bounds","Payment of $0.005 USDC toll not received — request rejected with 402","Chain enum value not recognized (must be 'solana' or 'base')"],"whenToPreferThis":"Choose Tollbooth when you need a non-custodial swap transaction that you sign yourself — especially useful for AI agents that control their own wallets and need auditable HMAC-signed receipts. Prefer this over custodial swap services when key security is paramount, or when you want optimal routing (Jupiter on Solana, 0x on Base) without managing DEX integrations directly. Use the free GET /v1/quote endpoint first to comparison-shop, then call this to build the final transaction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":5,"lastUsedAt":"2026-08-06T05:19:47.829Z","lastSuccessfullyRanAt":"2026-08-06T05:19:47.829Z","lastHealthCheckAt":"2026-10-11T00:36:57.729Z","isFirstParty":false,"canonicalSlug":"tollbooth-swap-build-12492393"}