{"uid":"cap_m0ltlF24tm5lKsZrXcggw","slug":"dexswap-quote-d43dbf26","name":"dexswap-quote","description":"Non-custodial swap calldata for Base: give tokenIn, tokenOut, raw amountIn, slippage and recipient; we read Aerodrome and Uniswap V3 on-chain state, pick the max-output route, and return ready-to-sign transaction calldata plus the ERC-20 approval, amountOutMin, price impact and the venues compared. You sign with your own wallet — we never hold or move funds.","url":"https://api.agentstools.dev/swap/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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["tokenIn","tokenOut","amountIn","recipient"],"properties":{"tokenIn":{"type":"string","description":"Sell token: a supported symbol (WETH, USDC, AERO, ...) or a 0x ERC-20 address on Base."},"amountIn":{"type":"string","description":"Sell amount in RAW atomic units of tokenIn (e.g. 1 WETH = 1000000000000000000). Integer as string."},"tokenOut":{"type":"string","description":"Buy token: a supported symbol or a 0x ERC-20 address on Base."},"recipient":{"type":"string","description":"0x address that receives tokenOut (baked into the calldata)."},"slippageBps":{"type":"integer","description":"Max slippage in basis points (50 = 0.5%). Default 50, max 5000."},"deadlineSeconds":{"type":"integer","description":"Seconds from now until the swap deadline. Default 600."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Viay4HKjdv85QDZkdBy9j","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns optimized DEX swap calldata on Base by comparing Aerodrome and Uniswap V3 routes and picking the best output, ready for the user to sign","exampleAgentPrompt":"Get me a swap quote to sell 1000 USDC (that's 1000000000 raw units) for WETH on Base, sending the output to 0xAbc123...def, with 50 bps slippage — I want to see the best route between Aerodrome and Uniswap V3 and the ready-to-sign calldata.","exampleUseCases":[{"title":"DeFi bot executing optimal Base swaps","prompt":"I want to swap 500 USDC (500000000 raw units) for AERO on Base, sending tokens to 0xDeF456...789 — find me the best route between Aerodrome and Uniswap V3, use 100 bps slippage, and give me the calldata I can sign immediately."},{"title":"Pre-trade price impact check","prompt":"Before I commit to swapping 2 WETH (2000000000000000000 raw units) for USDC on Base to address 0x1234...abcd, can you quote the best DEX route and tell me the expected price impact and minimum amount I'd receive?"},{"title":"Yield strategy token rebalancing","prompt":"I need to rebalance my Base portfolio — quote me a swap from AERO to WETH, selling 10000 AERO (that's 10000000000000000000000 raw units), recipient 0xFeed...cafe, 75 bps slippage, and show me whether Aerodrome or Uniswap V3 gives a better deal."}],"resultDescription":"Returns ready-to-sign EVM transaction calldata for the optimal swap route, the required ERC-20 approval payload, the minimum output amount (amountOutMin), estimated price impact percentage, and a breakdown of the venues (Aerodrome, Uniswap V3) that were compared with their respective output quotes.","failureModes":["Unsupported token symbol or invalid ERC-20 address returns an error — use a supported symbol or a valid 0x Base address","amountIn must be a non-zero integer string in raw atomic units; human-readable decimals will fail","Recipient must be a valid 0x Ethereum address","slippageBps exceeding 5000 is rejected","Insufficient on-chain liquidity for the token pair may return no viable route","Network or RPC issues reading Aerodrome or Uniswap V3 on-chain state may cause transient failures"],"whenToPreferThis":"Choose this endpoint when you need non-custodial DEX swap calldata specifically on Base mainnet, want automatic route comparison between Aerodrome and Uniswap V3, and need the full transaction ready to sign with your own wallet — without giving any third party custody of funds. Prefer this over generic swap APIs when you need Base-native DEX routing, price impact visibility, and built-in ERC-20 approval generation in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:47:57.648Z","isFirstParty":false,"canonicalSlug":"dexswap-quote-d43dbf26"}