{"uid":"cap_CdMd9MzAPED1kXUQM_206","slug":"defi-oracle-best-swap-route-finder-72627ccd","name":"DeFi Oracle — Best Swap Route Finder","description":"DeFi data for AI agents — yield rates, swap routes, IL calculator, liquidation risk, MEV scanner, TVL tracking. Powered by DeFiLlama + on-chain RPC data. Pay with USDC on Base via x402.","url":"https://defi-oracle-two.vercel.app/api/best-route","method":"POST","headers":{},"bodySchema":{"type":"object","required":["to_token","from_token"],"properties":{"chain":{"type":"string"},"to_token":{"type":"string","description":"Target token symbol"},"amount_usd":{"type":"number"},"from_token":{"type":"string","description":"Source token symbol"}}},"responseSchema":{"type":"object","properties":{"to":{"type":"string"},"from":{"type":"string"},"chain":{"type":"string"},"all_routes":{"type":"array"},"amount_usd":{"type":"number"},"best_route":{"type":"object"},"routes_found":{"type":"number"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_D8dqfg9zH7AG3rP9bH4Or","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Finds the optimal token swap route between two tokens on a given chain, comparing all available DEX routes and returning the best path with full route details.","exampleAgentPrompt":"What's the best swap route to trade $500 worth of ETH into USDC on Base — show me all available routes and which one gives the best rate?","exampleUseCases":null,"resultDescription":"Returns a structured object containing the best recommended swap route, a list of all discovered routes across DEXes, the number of routes found, and echoed input parameters (from token, to token, chain, amount in USD). The best_route object details the specific protocol path and pricing for the optimal trade.","failureModes":["Unsupported token symbol returns empty routes or error","Chain not supported returns no routes found","No liquidity available for the pair returns routes_found: 0","Invalid token symbol format causes request validation error","Network RPC connectivity issues may cause timeouts or stale data"],"whenToPreferThis":"Use this endpoint when an AI agent needs to find the most efficient on-chain swap path between two specific tokens before executing a trade, or when comparing DEX routes to minimize slippage and fees. Best suited for pre-trade analysis on supported chains where DeFiLlama aggregation data is available.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:32:58.551Z","isFirstParty":false}