{"uid":"cap_ELKNvIHA8DvIHL5jOKjO5","slug":"agent-data-tools-revmesh2074-workers-dev-swap-quote-best-dex-route-li-0fb53fe9","name":"Swap Quote – Best DEX Route (LI.FI Aggregator)","description":"Swap quote, best DEX route. Best price to swap one token for another on 30+ chains (Base, Ethereum, Arbitrum, Solana, BSC…) across DEX aggregators, via LI.FI: amount out, minimum after slippage, USD values, gas and fees, total cost in percent, route and approval address; with fromAddress, the unsigned transaction for your wallet to sign. Tokens by symbol or address, amounts in token units. A quote only: nothing is signed or sent. Use before a trading agent swaps.","url":"https://agent-data-tools.revmesh2074.workers.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"],"type":"string"},"queryParams":{"type":"object","required":["fromChain","fromToken","amount","toToken"],"properties":{"amount":{"type":"string","examples":["1000"],"description":"Amount of fromToken in token units, e.g. 100 or 0.5"},"toToken":{"type":"string","examples":["ETH"],"description":"Token to buy: symbol or address"},"slippage":{"type":"number","examples":[0.5],"description":"Slippage tolerance in percent (default 0.5)"},"fromChain":{"type":"string","examples":["base"],"description":"Chain name or id: base, ethereum, arbitrum, solana…"},"fromToken":{"type":"string","examples":["USDC"],"description":"Token to sell: symbol (USDC, ETH) or address"},"toAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x000000000000000000000000000000000000dEaD"],"description":"Optional receiving wallet, e.g. a Solana address when bridging to Solana"},"fromAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x000000000000000000000000000000000000dEaD"],"description":"Optional wallet that would send: adds the unsigned transaction to the answer"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"to":{"type":"object","properties":{"token":{"type":"string"},"amount":{"type":"string"},"address":{"type":"string"},"chainId":{"type":"number"},"amountMin":{"type":"string"},"amountUsd":{"type":"number"}}},"from":{"type":"object","properties":{"token":{"type":"string"},"amount":{"type":"string"},"address":{"type":"string"},"chainId":{"type":"number"},"amountUsd":{"type":"number"}}},"note":{"type":"string"},"rate":{"type":"number"},"costs":{"type":"object","properties":{"gasUsd":{"type":"number"},"feesUsd":{"type":"number"},"totalLossPercent":{"type":"number"}}},"route":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"via":{"type":"string"},"type":{"type":"string"},"toChainId":{"type":"number"},"fromChainId":{"type":"number"}}}},"source":{"type":"string"},"approvalAddress":{"type":"string"},"slippagePercent":{"type":"number"},"estimatedSeconds":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"to":{"token":"ETH","amount":"0.448115540014","address":"0x0000000000000000000000000000000000000000","chainId":8453,"amountMin":"0.445874290140619979","amountUsd":1000.92},"from":{"token":"USDC","amount":"1000","address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chainId":8453,"amountUsd":999.9},"note":"A quote, not an order…","rate":0.000448115540014,"costs":{"gasUsd":0.02,"feesUsd":2.5,"totalLossPercent":0.25},"route":"Fly","steps":[{"via":"Fly","type":"swap","toChainId":8453,"fromChainId":8453}],"source":"LI.FI (li.quest)","approvalAddress":"0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE","slippagePercent":0.5,"estimatedSeconds":0}},"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_ugUSmBIJbD6LnIyRIDeAG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Returns the best DEX swap quote across 30+ chains and multiple DEX aggregators, including amount out, slippage-adjusted minimum, gas/fee costs, route steps, and optionally an unsigned transaction ready to sign.","exampleAgentPrompt":"Can you get me the best DEX swap quote to trade 100 USDC for ETH on Base — include the unsigned transaction so I can sign it, and use my wallet address 0xAbC123...?","exampleUseCases":[{"title":"Pre-trade price check on Arbitrum","prompt":"Before I swap, what's the best price I can get for selling 0.5 ETH for USDC on Arbitrum? Show me the route, gas fees, and total cost percentage."},{"title":"Cross-chain swap quote from ETH to Solana","prompt":"I want to swap 200 USDC on Ethereum for SOL on Solana — can you get me a quote with the best route and tell me how much SOL I'll receive after slippage and fees?"},{"title":"Trading bot pre-execution quote","prompt":"Get me an unsigned transaction for swapping 1000 USDC to WBTC on Base from my wallet 0xDe4d...beef — I need the approval address too so I can approve the spend first."}],"resultDescription":"A JSON object containing: output token and amount, minimum amount after slippage, USD value of the output, source token and amount in USD, exchange rate, gas cost in USD, protocol fees in USD, total loss percentage, DEX route description, step-by-step route breakdown (each with protocol name, type, and chain IDs), estimated execution time in seconds, approval address, slippage percentage applied, and optionally an unsigned transaction if fromAddress was provided.","failureModes":["Unsupported chain name or ID returns an error","Token symbol not found on the specified chain (use token address instead)","No liquidity route found between the two tokens","Amount too small to route (below minimum swap threshold)","LI.FI upstream timeout or service unavailability","Invalid wallet address format for fromAddress or toAddress","Slippage tolerance out of valid range"],"whenToPreferThis":"Use this endpoint when an AI trading agent needs to price a token swap across multiple DEX aggregators on 30+ chains before committing to a transaction. It is specifically backed by LI.FI aggregation, which covers cross-chain bridging as well as single-chain swaps. Prefer this over single-DEX APIs when you want best-price routing. Use it as a mandatory pre-execution step — it only produces quotes, never submits transactions, so there is zero risk of unintended trades.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-07T07:18:33.566Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-swap-quote-best-dex-route-li-0fb53fe9"}