{"uid":"cap_uKlyl_U3SCkwEzogPvtf2","slug":"kyberswap-dex-quote-via-x402-f1b30ec4","name":"KyberSwap DEX Quote via x402","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/kyberswap/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":["from","to","amount"],"properties":{"to":{"type":"string","examples":["WETH"],"description":"Token out: symbol or 0x address"},"from":{"type":"string","examples":["USDC"],"description":"Token in: symbol (USDC, ETH, WETH, cbBTC, DAI, USDbC, AERO, DEGEN, BRETT, VIRTUAL) or 0x address"},"amount":{"type":"string","examples":["10"],"description":"Amount of token in, human units (e.g. 10 = 10 USDC)"},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Optional sender/recipient: returns ready-to-sign tx + allowance/balance check"},"slippage_bps":{"type":"integer","maximum":2000,"minimum":1,"description":"Slippage tolerance in bps (default 50 = 0.5%)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"to":{"symbol":"WETH","address":"0x4200000000000000000000000000000000000006","decimals":18},"from":{"symbol":"USDC","address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","decimals":6},"hops":1,"chain":"base","price":2224.6,"route":["pmm-2"],"router":"0x6131b5fae19ea4f9d964eac0408e4408b66337b5","source":"kyberswap","gas_usd":0.0319,"min_out":0.00447272,"verdict":"GOOD","cost_pct":-0.73,"guidance":"Good fill. Pass wallet= for ready-to-sign calldata; verify it with /crypto/decode-calldata before signing.","amount_in":10,"amount_out":0.0044952,"l1_fee_usd":0.0015,"net_out_usd":10.0153,"router_label":"KyberSwap MetaAggregation Router v2","slippage_bps":50,"amount_in_usd":9.976,"amount_out_usd":10.0487}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yzl7bTXNomYE6sFkiT2tn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Get a multi-hop DEX swap quote on Base via KyberSwap aggregator, including route, gas costs, slippage analysis, and optionally ready-to-sign calldata.","exampleAgentPrompt":"What's the best swap quote for 10 USDC to WETH on Base right now — is it a good fill, and what will it cost me in gas?","exampleUseCases":[{"title":"Pre-trade slippage and cost check","prompt":"I want to swap 500 USDC for WETH on Base — can you check the KyberSwap quote and tell me the verdict, the gas cost, and what percentage I'm losing to fees and slippage?"},{"title":"Onchain agent preparing swap calldata","prompt":"Get me a ready-to-sign swap transaction for 100 USDC to cbBTC on Base from my wallet 0xAbCd1234AbCd1234AbCd1234AbCd1234AbCd1234, with 75 bps slippage tolerance."},{"title":"Best execution route discovery","prompt":"Compare the route KyberSwap would use to swap 1000 USDC to AERO on Base — how many hops, which pools, and what's the net output in USD?"}],"resultDescription":"Returns a JSON object with the input and output token details (symbol, address, decimals), quoted amount out, spot price, route hops and pool sources, router address and label, gas cost in USD, L1 fee in USD, net output in USD, cost percentage relative to market, a verdict (GOOD/FAIR/POOR), and human-readable guidance. If a wallet address is supplied, also returns ready-to-sign calldata and allowance/balance information.","failureModes":["Unsupported token symbol — returns error if token is not in the supported list and no 0x address is provided","Insufficient liquidity — no route found between the token pair","Invalid wallet address format — must match ^0x[0-9a-fA-F]{40}$","Amount too small — gas costs may exceed swap value, verdict likely POOR","Slippage out of range — slippage_bps must be between 1 and 2000","x402 payment failure — call blocked if USDC micropayment on Base is not processed"],"whenToPreferThis":"Use this endpoint when an AI agent needs a live DEX swap quote on Base via KyberSwap's aggregation engine, especially when you want route analysis, gas cost breakdown, fill quality verdict, and optionally ready-to-sign calldata — all without managing API keys. Prefer over raw on-chain calls or other quote APIs when operating on Base with USDC/ETH/cbBTC/AERO/DEGEN/BRETT/VIRTUAL tokens and needing structured, agent-friendly output with built-in trade quality assessment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T18:32:59.158Z","isFirstParty":false,"canonicalSlug":"kyberswap-dex-quote-via-x402-f1b30ec4"}