{"uid":"cap_2yJE7J4mxUSF7kZWVZqll","slug":"3route-multichain-swap-quote-transaction-builder-42fe583e","name":"3Route Multichain Swap Quote & Transaction Builder","description":"3Route is an agent-ready multichain swap API from Baking Bad, a provider of tools for agents. Discover tokens for free, then pay per quote or unsigned swap.","url":"https://3route.agents.bakingbad.dev/api/v6.1/%7BchainId%7D/swap?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"},"pathParams":{"type":"object","required":["chainId"],"properties":{"chainId":{"enum":["4663","42793","128064"],"type":"string","example":"4663","pattern":"^[0-9]+$"}},"additionalProperties":false},"queryParams":{"type":"object","required":["src","dst","amount","from"],"properties":{"dst":{"type":"string","example":"0x2222222222222222222222222222222222222222","pattern":"^0x[0-9a-fA-F]{40}$"},"fee":{"type":"number","default":0,"maximum":3,"minimum":0},"src":{"type":"string","example":"0x0000000000000000000000000000000000000000","pattern":"^0x[0-9a-fA-F]{40}$"},"from":{"type":"string","example":"0x1111111111111111111111111111111111111111","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string","example":"1000000000000000000","pattern":"^[0-9]+$"},"gasPrice":{"type":"string","example":"1000000000","pattern":"^[0-9]+$"},"receiver":{"type":"string","example":"0x1111111111111111111111111111111111111111","pattern":"^0x[0-9a-fA-F]{40}$"},"referrer":{"type":"string","example":"0x1111111111111111111111111111111111111111","pattern":"^0x[0-9a-fA-F]{40}$"},"slippage":{"type":"number","default":1,"example":1,"maximum":50,"minimum":0},"protocols":{"type":"string"},"isExactOutput":{"type":"boolean","default":false},"includeProtocols":{"type":"boolean","default":false},"excludedProtocols":{"type":"string"},"includeTokensInfo":{"type":"boolean","default":false},"includeBlockNumber":{"type":"boolean","default":false}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"tx":{"to":"0x2222222222222222222222222222222222222222","gas":"210000","data":"0x1234","from":"0x1111111111111111111111111111111111111111","value":"1000000000000000000","gasPrice":"1000000000"},"gas":210000,"dstAmount":"950000","srcAmount":"1000000000000000000","dstAmountMin":"940500"}},"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_AnIBSvkwmBB-OimvLcn-R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns an optimized DEX swap route and unsigned transaction for exchanging one token for another on a specified blockchain","exampleAgentPrompt":"Swap 1 ETH for USDC on Ethereum mainnet (chain ID 1) using my wallet address 0xAbC...123 as the sender, with a maximum slippage of 1% — give me the unsigned transaction I can sign and broadcast.","exampleUseCases":[{"title":"DeFi agent auto-rebalances portfolio","prompt":"I want to rebalance my wallet on Ethereum — sell exactly 500 USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for ETH from my address 0xDe...F1 on chain ID 1 with 0.5% slippage. Give me the unsigned swap transaction."},{"title":"Cross-token payment settlement","prompt":"I need to convert 10,000 MATIC (native asset on Polygon, chain ID 137) into USDT (0xc2132D05D31c914a87C6611C10748AEb04B58e8F) from my wallet 0xAa...99 with 1% slippage so I can settle an invoice — get me the swap transaction."},{"title":"Referral-fee embedded swap for dApp","prompt":"Build a swap transaction on Arbitrum (chain ID 42161) selling 0.5 WETH (0x82aF49447D8a07e3bd95BD0d56f35241523fBab1) for USDC, from wallet 0xBb...22, with a 0.3% referral fee going to my fee address 0xFee...01 and 1% slippage tolerance."}],"resultDescription":"Returns a ready-to-sign transaction object (to, data, gas, gasPrice, value, from), estimated gas integer, the actual src and dst token amounts, the aggregated route across DEX protocols, and optionally full token metadata for both the sold and bought tokens. The agent must sign and broadcast the transaction separately.","failureModes":["400 if amount is zero or invalid","400 if fee is outside the allowed range","400 if src or dst token address is not recognized on the specified chain","No route found if liquidity is insufficient for the pair","Stale quote if network conditions change between quote and broadcast","Transaction revert if dstAmountMin is not met due to price movement exceeding slippage"],"whenToPreferThis":"Use this endpoint when an agent needs to perform on-chain token swaps with optimized DEX routing across multiple protocols on a supported EVM chain. Prefer 3Route over single-DEX APIs when best execution price and multi-protocol aggregation matter. It is especially suited for autonomous agents that build and broadcast their own transactions, as it returns unsigned calldata rather than executing the swap on behalf of the user.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:30:03.220Z","isFirstParty":false,"canonicalSlug":"3route-multichain-swap-quote-transaction-builder-42fe583e"}