# DEX Token Swap Quote

> DEX Token Swap Quote is a paid API for AI agents from 138-197-15-135.sslip.io, paid per call via x402, $0.0045/call, status unknown (last checked 2026-10-31).

Returns a real-time DEX swap quote (price, output amount, venue, gas estimate) for a given token pair and input amount on EVM chains.

## Facts

- Endpoint: GET https://138-197-15-135.sslip.io/v1/dex/quote?utm_source=zero.xyz
- Price: $0.0045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dex-token-swap-quote-4a77b585
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Z5ysL85dYz_jUpa7ySLs7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability dex-token-swap-quote-4a77b585
```

Example prompt: What's the current DEX swap quote for 1 ETH to USDC on Base — which venue gives me the best price and how much would I get out?

## When to prefer this

Choose this endpoint when you need a real-time on-chain DEX swap quote for EVM-compatible chains (Base, Ethereum, Arbitrum, Optimism) without executing a trade. It is ideal for pre-trade price checks, arbitrage scanning, DeFi portfolio tooling, and gas estimation. Prefer this over CEX price feeds when you specifically need on-chain DEX venue and fee tier data. It charges per call via x402 USDC micropayments, making it suitable for agent-driven, pay-as-you-go workflows.

## Known failure modes

- Unsupported token address returns null fields or error
- Invalid amountIn format (non-numeric string) may cause a 400 error
- Unsupported chain value returns an error or defaults to Base
- Low liquidity pairs may return null amountOut or stale price
- Payment failure via x402 results in 402 response before any data is returned

## How this service works

Best Uniswap v3 single-hop quote for swapping amountIn of tokenIn to tokenOut on Base, Ethereum, Arbitrum or Optimism, checking all fee tiers (0.01/0.05/0.3/1%). Returns amountOut, effective price, best fee tier, gas estimate. Tokens: ETH, USDC, USDT or 0x address. Read-only quote; no swap is executed. Deterministic, no LLM.

## Output

Returns a JSON object with the chain, trading venue (e.g. uniswap-v3), fee tier, tokenIn symbol and amount, tokenOut symbol and estimated output amount, the effective price (tokenOut per tokenIn unit), and a gas estimate in gas units for the swap transaction.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "queryParams"
   ],
   "properties": {
    "queryParams": {
     "type": "object",
     "required": [
      "tokenIn",
      "tokenOut",
      "amountIn"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "Chain: base (default), ethereum, arbitrum, optimism"
      },
      "tokenIn": {
       "type": "string",
       "description": "ETH, USDC, USDT or 0x address"
      },
      "amountIn": {
       "type": "string",
       "description": "Human amount of tokenIn, e.g. 1.5"
      },
      "tokenOut": {
       "type": "string",
       "description": "ETH, USDC, USDT or 0x address"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [],
     "properties": {
      "chain": {
       "type": [
        "string",
        "null"
       ]
      },
      "price": {
       "type": [
        "number",
        "null"
       ]
      },
      "venue": {
       "type": [
        "string",
        "null"
       ]
      },
      "feeTier": {
       "type": [
        "integer",
        "null"
       ]
      },
      "tokenIn": {
       "type": [
        "string",
        "null"
       ]
      },
      "amountIn": {
       "type": [
        "string",
        "null"
       ]
      },
      "tokenOut": {
       "type": [
        "string",
        "null"
       ]
      },
      "amountOut": {
       "type": [
        "string",
        "null"
       ]
      },
      "gasEstimate": {
       "type": [
        "string",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "price": 2325.41,
  "venue": "uniswap-v3",
  "feeTier": 500,
  "tokenIn": "WETH",
  "amountIn": "1",
  "tokenOut": "USDC",
  "amountOut": "2325.41",
  "gasEstimate": "90000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dex-token-swap-quote-4a77b585/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 138-197-15-135.sslip.io](https://www.zero.xyz/host/138-197-15-135.sslip.io/llms.txt)
