{"uid":"cap_CJH2LbZFrJvpD9tO8rcde","slug":"3route-multichain-swap-quote-unsigned-transaction-builder-36f213b5","name":"3Route Multichain Swap Quote & Unsigned Transaction Builder","description":"Best-priced crypto token swaps for agents, traders and apps. Pay-per-call quote & swap API via x402/MPP. No API key or subscription.","url":"https://3route.agents.bakingbad.dev/v1/pro/%7BchainId%7D/swap","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"],"type":"string","example":"4663","pattern":"^[0-9]+$","description":"Chain ID for the operation."}},"additionalProperties":false},"queryParams":{"type":"object","required":["src","dst","amount","from"],"properties":{"dst":{"type":"string","example":"0x5fc5360d0400a0fd4f2af552add042d716f1d168","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address of the token being bought; take one from the token-list operation for the selected chain, or use the zero address, or the case-insensitive sentinel 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, for the chain's native asset."},"fee":{"type":"number","default":0,"maximum":3,"minimum":0},"src":{"type":"string","example":"0x0000000000000000000000000000000000000000","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address of the token being sold; use the zero address, or the case-insensitive sentinel 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, for the chain's native asset."},"from":{"type":"string","example":"0x1111111111111111111111111111111111111111","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that signs and sends the transaction, and that the src tokens are taken from"},"amount":{"type":"string","example":"1000000000000000000","pattern":"^[0-9]+$","description":"Positive amount in smallest units, as an integer string."},"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"},"timestamp":{"type":"integer","minimum":0},"blockNumber":{"type":"integer","minimum":0},"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_2wNOG6kQk8Zs4T8QmcLvv","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":"Returns an optimal swap route and unsigned transaction payload for exchanging one token for another on a specified EVM-compatible chain.","exampleAgentPrompt":"I want to swap 1 ETH (the native asset on chain 4663) for the token at address 0x5fc5360d0400a0fd4f2af552add042d716f1d168 — my wallet is 0x1111111111111111111111111111111111111111, use 1% slippage and build me the unsigned transaction.","exampleUseCases":[{"title":"DeFi agent auto-rebalances portfolio","prompt":"Rebalance my portfolio by swapping 500 USDC (at 0x5fc5360d0400a0fd4f2af552add042d716f1d168) into the native asset on chain 4663 from my wallet 0xABCDabcdABCDabcdABCDabcdABCDabcdABCDabcd — use 0.5% slippage and give me the unsigned transaction to sign."},{"title":"Arbitrage bot fetches swap calldata","prompt":"Get me the swap transaction data to trade 2000000000000000000 units of token 0xAAbbCCdd1122334455667788990011aabbccdd11 into 0x5fc5360d0400a0fd4f2af552add042d716f1d168 on chain 4663, sender is 0x9999999999999999999999999999999999999999, with 2% max slippage."},{"title":"Onchain payment settled in preferred token","prompt":"A user just paid in the native token on chain 4663 but needs it converted to 0x5fc5360d0400a0fd4f2af552add042d716f1d168 — amount is 500000000000000000, from wallet 0x2222222222222222222222222222222222222222, deliver it to 0x3333333333333333333333333333333333333333, keep slippage under 1%."}],"resultDescription":"Returns a JSON object containing: an unsigned transaction object (to, from, data, value, gas, gasPrice) ready to sign and broadcast; the expected destination token amount (dstAmount); the minimum guaranteed destination amount accounting for slippage (dstAmountMin); and the source amount (srcAmount) and total gas estimate. The agent must sign and submit the transaction separately.","failureModes":["Invalid or unsupported chainId returns an error — only chain 4663 is supported on this endpoint","Zero or negative amount string triggers validation error","Source and destination token addresses must be valid 0x-prefixed 40-hex-char addresses or the zero address sentinel","Insufficient liquidity for the requested pair results in a routing failure response","Slippage value out of range (must be 0–100) returns a validation error","Payment required (HTTP 402) if x402 payment header is missing or underfunded"],"whenToPreferThis":"Use this endpoint when an AI agent needs to build a ready-to-sign swap transaction on chain 4663 (Etherlink or similar) via the 3Route DEX aggregator, especially when optimal routing across DEX liquidity pools is needed. Prefer it over on-chain calls when you need off-chain route computation before submitting. It is particularly suited for agent workflows that programmatically pay per call via x402 micropayments (USDC) without requiring API key management.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:39:48.506Z","isFirstParty":false}