# dexswap-price

> dexswap-price is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Returns a lightweight swap price quote (best route, output amount, price impact) across Aerodrome and Uniswap V3 on Base without building a full transaction

## Facts

- Endpoint: GET https://payai.agentstools.dev/swap/price?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dexswap-price-8d39cf08
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CJlUmoEep3CXJpBA7HzP5

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 dexswap-price-8d39cf08
```

Example prompt: Before I execute the transaction, check the best swap price for selling 1 WETH (1000000000000000000 raw units) to get USDC on Base — show me the best route across Aerodrome and Uniswap V3, the expected output, and price impact with 50 bps slippage.

## When to prefer this

Use this endpoint when you need a fast, cheap price check before constructing a full swap transaction on Base — especially when you want to compare Aerodrome and Uniswap V3 routes and assess price impact without the overhead of calldata generation. Prefer this over full swap-transaction endpoints when only a quote is needed for display, comparison, or pre-flight validation.

## Known failure modes

- Unsupported token symbol or unrecognized ERC-20 address returns an error
- amountIn of zero or non-integer string causes validation failure
- slippageBps exceeding 5000 is rejected
- Token pair with no liquidity on either venue returns no route found
- Network issues or RPC timeouts cause transient 5xx errors

## How this service works

Lightweight swap quote for Base without calldata: give tokenIn, tokenOut and raw amountIn and get the max-output route across Aerodrome and Uniswap V3, the buy amount, amountOutMin, price impact and the venues compared. A cheap price check before you build the full transaction.

## Output

Returns the optimal DEX route across Aerodrome and Uniswap V3, the expected buy amount in raw units, the minimum output amount (amountOutMin) after slippage, price impact percentage, and a breakdown of the venues compared — all without building a calldata transaction.

## Request schema (JSON Schema)

```json
{
 "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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "tokenIn",
      "tokenOut",
      "amountIn"
     ],
     "properties": {
      "tokenIn": {
       "type": "string",
       "description": "Sell token: a supported symbol (WETH, USDC, AERO, ...) or a 0x ERC-20 address on Base."
      },
      "amountIn": {
       "type": "string",
       "description": "Sell amount in RAW atomic units of tokenIn (e.g. 1 WETH = 1000000000000000000). Integer as string."
      },
      "tokenOut": {
       "type": "string",
       "description": "Buy token: a supported symbol or a 0x ERC-20 address on Base."
      },
      "slippageBps": {
       "type": "integer",
       "description": "Max slippage in basis points (50 = 0.5%). Default 50, max 5000."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dexswap-price-8d39cf08/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
