{
  "markdown": "# DEX Swap Quotes API\n\n[![MCP Server](https://img.shields.io/badge/MCP-server-blue)](https://dex-quotes.api.klymax402.com/mcp)\n[![x402](https://img.shields.io/badge/payments-x402-6E56CF)](https://x402.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\nBest swap quotes across Uniswap, SushiSwap, Aerodrome -- price impact, route, slippage. Pre-trade essential. Pay-per-call via [x402](https://x402.org) (USDC on Base L2) -- no API key, no signup, no rate-limit wall.\n\nPart of the [klymax402](https://klymax402.com) marketplace -- 100 x402 micropayment APIs for AI agents, one wallet, USDC on Base.\n\n## Quickstart -- MCP\n\nAdd to your MCP client config (Claude Desktop, Cursor, ElizaOS, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"dex-quotes\": {\n      \"url\": \"https://dex-quotes.api.klymax402.com/mcp\"\n    }\n  }\n}\n```\n\n## Quickstart -- HTTP (x402)\n\n```bash\ncurl \"https://dex-quotes.api.klymax402.com/api/quote?tokenIn=...&tokenOut=...&amount=...\"\n# -> 402 Payment Required, with an x402 payment challenge in the response body\n```\n\nAny x402-aware client ([`@x402/fetch`](https://www.npmjs.com/package/@x402/fetch), [`x402-agent-tools`](https://www.npmjs.com/package/x402-agent-tools), ATXP) handles the 402 -> sign -> retry cycle automatically.\n\n## Tools\n\n| Tool | Method | Path | Price | Description |\n|---|---|---|---|---|\n| `dex_get_swap_quote` | GET | `/api/quote` | $0.012 | Get the best swap quote across multiple DEXes |\n| `dex_get_swap_quote` | POST | `/api/quote` | $0.012 | Get the best swap quote across multiple DEXes (POST variant) |\n\n### `dex_get_swap_quote`\n\nUse this when you need a swap quote before trading tokens on-chain. Returns the best price across multiple DEXes in JSON.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n|---|---|---|---|\n| `tokenIn` | string | yes | Contract address of input token (e.g. 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 for USDC on Base) |\n| `tokenOut` | string | yes | Contract address of output token (e.g. 0x4200000000000000000000000000000000000006 for WETH on Base) |\n| `amount` | string | yes | Amount of input token in raw units (wei/smallest unit, e.g. 1000000 for 1 USDC) |\n| `chain` | string | no | Blockchain network: base or ethereum (default: base) |\n\n**Returns**\n\n- `bestDex` -- which DEX offers the best rate (Uniswap, SushiSwap, Aerodrome)\n- `amountOut` -- expected output token amount\n- `priceImpact` -- percentage price impact of the trade\n- `minimumReceived` -- minimum output after slippage tolerance\n- `route` -- swap path (e.g. USDC -> WETH -> TOKEN)\n- `gasEstimateUsd` -- estimated gas cost in USD\n\nExample response:\n\n```json\n{\"bestDex\":\"Uniswap V3\",\"amountOut\":\"0.3215\",\"priceImpact\":\"0.12%\",\"minimumReceived\":\"0.3183\",\"route\":[\"USDC\",\"WETH\"],\"gasEstimateUsd\":0.04}\n```\n\n**When to use**: executing any token swap to find the best rate and estimate slippage. Essential for trade sizing and DEX comparison.\n\n**Not for**: gas estimation only (use `gas_get_current_price`), yield opportunities (use `defi_find_best_yields`), wallet balance (use `wallet_get_portfolio`).\n\n### `dex_get_swap_quote`\n\nUse this when you need a swap quote before trading tokens on-chain. Returns the best price across multiple DEXes in JSON. POST variant of dex_get_swap_quote -- same params passed as JSON body instead of query string.\n\n**Parameters**\n\n| Name | Type | Required | Description |\n|---|---|---|---|\n| `tokenIn` | string | yes | Contract address of input token (e.g. 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 for USDC on Base) |\n| `tokenOut` | string | yes | Contract address of output token (e.g. 0x4200000000000000000000000000000000000006 for WETH on Base) |\n| `amount` | string | yes | Amount of input token in raw units (wei/smallest unit, e.g. 1000000 for 1 USDC) |\n| `chain` | string | no | Blockchain network: base or ethereum (default: base) |\n\n**Returns**\n\n- `bestDex` -- which DEX offers the best rate (Uniswap, SushiSwap, Aerodrome)\n- `amountOut` -- expected output token amount\n- `priceImpact` -- percentage price impact of the trade\n- `minimumReceived` -- minimum output after slippage tolerance\n- `route` -- swap path (e.g. USDC -> WETH -> TOKEN)\n- `gasEstimateUsd` -- estimated gas cost in USD\n\nExample response:\n\n```json\n{\"bestDex\":\"Uniswap V3\",\"amountOut\":\"0.3215\",\"priceImpact\":\"0.12%\",\"minimumReceived\":\"0.3183\",\"route\":[\"USDC\",\"WETH\"],\"gasEstimateUsd\":0.04}\n```\n\n**When to use**: executing any token swap to find the best rate and estimate slippage. Essential for trade sizing and DEX comparison.\n\n**Not for**: gas estimation only (use `gas_get_current_price`), yield opportunities (use `defi_find_best_yields`), wallet balance (use `wallet_get_portfolio`).\n\n## Example agent prompts\n\n- \"A swap quote before trading tokens on-chain\"\n- \"A swap quote before trading tokens on-chain\"\n\n## Payment\n\n- Protocol: [x402](https://x402.org) -- HTTP-native pay-per-call, no signup, no API key\n- Network: Base L2 (`eip155:8453`)\n- Asset: USDC\n- Facilitator: Coinbase CDP (primary), PayAI (fallback)\n- Also reachable via [ATXP](https://atxp.ai) (OAuth-wrapped x402, RFC 9728 protected-resource metadata)\n\n## Part of klymax402\n\n100 x402 micropayment APIs for AI agents -- one wallet, USDC on Base, zero signup.\n\n- Catalog: https://klymax402.com/llms.txt\n- Full API reference: https://klymax402.com/llms-full.txt\n- Live stats: https://klymax402.com/stats\n\n## License\n\nMIT\n",
  "bytes": 5373,
  "sha": "ee74da05d8da4ec1a1599e3cde9efe87a1a7dfeab7f4c5c7400e26d3bc53d0a6",
  "repo_slug": "br0ski777/dex-quotes-x402",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_br0ski777_dex_quotes_219af166/readme"
}