{"uid":"cap_Q24uvcJ62kCkNEPeHWGBT","slug":"3route-token-swap-quote-api-5d62e082","name":"3Route Token Swap Quote API","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://api.3route.io/v1/pro/%7BchainId%7D/quote?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":["1","4663","42793","8453","143"],"type":"string","example":"4663","pattern":"^[0-9]+$","description":"Chain ID for the operation."}},"additionalProperties":false},"queryParams":{"type":"object","required":["src","dst","amount"],"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"},"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]+$"},"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":{"gas":210000,"dstAmount":"950000","srcAmount":"1000000000000000000"}},"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_B0FQYvQLDU6RxWX8UZweg","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 a best-priced swap quote for exchanging one crypto token for another on a specified chain, including output amount and estimated gas.","exampleAgentPrompt":"What's the best swap quote to trade 1 ETH (1000000000000000000 wei) for USDC (0x5fc5360d0400a0fd4f2af552add042d716f1d168) on chain 4663? Use the native asset as the source token.","exampleUseCases":[{"title":"Pre-trade price check for DeFi bot","prompt":"Before executing the swap, get me a quote for trading 500 USDC (0x5fc5360d0400a0fd4f2af552add042d716f1d168) for the native chain asset on chain 4663 — I need the exact output amount and estimated gas so I can decide if it's worth it."},{"title":"Arbitrage opportunity scanner","prompt":"Fetch swap quotes for trading 1000000000 units of token 0x5fc5360d0400a0fd4f2af552add042d716f1d168 to the native asset (zero address) on chain 4663, and include which protocols are used so I can spot arbitrage opportunities."},{"title":"Best rate comparison for wallet app","prompt":"My user wants to swap 2 ETH worth of the native token for token 0x5fc5360d0400a0fd4f2af552add042d716f1d168 on chain 4663 — can you pull the best available quote including gas estimate so I can show them what they'd get?"}],"resultDescription":"Returns a JSON object containing the estimated destination token amount (dstAmount), the source amount (srcAmount), and the estimated gas cost for the swap. Optionally includes protocol routing details, token info, and block number if requested.","failureModes":["Invalid or unsupported chain ID returns an error response","Malformed token address (not matching 0x hex pattern) causes a 400-level error","Amount of zero or non-integer amount string is rejected","Unsupported token pair with no available liquidity route returns no quote or error","Payment not completed via x402/MPP protocol results in 402 Payment Required","Network timeout or upstream DEX provider unavailability causes request failure"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-call, no-subscription DEX aggregator quote on chain 4663 without requiring an API key. Ideal for agents and bots that need on-demand, best-priced swap quotes with no recurring commitment. Prefer this over centralized exchange APIs when operating in a DeFi/on-chain context, and over subscription-based aggregators when call volume is unpredictable or low.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T18:30:05.658Z","isFirstParty":false,"canonicalSlug":"3route-token-swap-quote-api-5d62e082"}