{"uid":"cap_AtOdGVrUKqF-DzKUAIJpX","slug":"dexswap-price-b8c9e8af","name":"dexswap-price","description":"Lightweight swap quote for Base without calldata: give tokenIn, tokenOut and raw amountIn and get the max-output route across Aerodrome and Uniswap V3, the buy amount, amountOutMin, price impact and the venues compared. A cheap price check before you build the full transaction.","url":"https://api.agentstools.dev/swap/price","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"],"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."},"slippageBps":{"type":"integer","description":"Max slippage in basis points (50 = 0.5%). Default 50, max 5000."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Vadla_AEMW3ByAEOlO2lK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a lightweight DEX swap price quote on Base, comparing Aerodrome and Uniswap V3 routes to find the best output for a given token pair and amount.","exampleAgentPrompt":"Before I swap, can you check how much USDC I'd get for selling 1 WETH (1000000000000000000 raw units) on Base, comparing Aerodrome and Uniswap V3, with a max slippage of 50 basis points?","exampleUseCases":[{"title":"Pre-trade price check for ETH sell","prompt":"I'm about to sell 2 WETH for USDC on Base — can you quickly check the best quote across Aerodrome and Uniswap V3, using 2000000000000000000 as the raw amount, and tell me the expected output, price impact, and minimum I'd receive?"},{"title":"Arbitrage route comparison for AERO","prompt":"Compare Aerodrome and Uniswap V3 swap rates for converting 5000 AERO to USDC on Base — give me the best route, expected buy amount, and price impact. Use 5000000000000000000000 as the raw AERO amount."},{"title":"Slippage-sensitive DeFi bot preflight","prompt":"Before my bot builds the swap transaction, get me a price quote for selling 500 USDC (500000000 raw units) to WETH on Base with a tight 10 basis point slippage — I need the amountOutMin and which DEX wins."}],"resultDescription":"Returns the optimal swap route (Aerodrome or Uniswap V3), the expected buy amount in raw units, the minimum output after slippage (amountOutMin), the price impact percentage, and a comparison of all venues evaluated — without building calldata.","failureModes":["Unsupported token symbol or invalid ERC-20 address returns an error","amountIn of zero or non-integer string causes validation failure","Token pair with no liquidity on either venue returns no route found","slippageBps exceeding 5000 is rejected","Network issues or RPC failures may return a 5xx error","Payment of $0.01 USDC not provided or rejected results in 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a fast, cheap price check on Base before constructing a full swap transaction — it avoids the overhead of calldata generation. Ideal for bots or agents that want to pre-screen price impact, compare Aerodrome vs Uniswap V3, or determine amountOutMin before committing to a trade. Not suitable if you need executable calldata (use dexswap-build for that) or if you're trading on chains other than Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:01:17.942Z","isFirstParty":false}