# AllTheBot Base Swap Quote

> AllTheBot Base Swap Quote is a paid API for AI agents from api.zkrobotics.fr, paid per call via x402, $0.0025/call, status unknown (last checked 2026-10-12).

Returns live DEX swap quotes for any ERC-20 token pair on Base, ranked best-first across Uniswap v3 and Aerodrome, with a low-liquidity flag — read-only, no swap executed.

## Facts

- Endpoint: GET https://api.zkrobotics.fr/x402/base/swap-quote?utm_source=zero.xyz
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/allthebot-base-swap-quote-2cb861b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0TEkTWDwLh0ymxo0kuuGn

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 allthebot-base-swap-quote-2cb861b0
```

Example prompt: What's the best price I can get swapping 1 ETH for USDC on Base right now — check Uniswap v3 and Aerodrome and tell me which venue wins and if liquidity looks thin?

## When to prefer this

Use this endpoint when you need a real-time, multi-venue DEX price comparison on Base before deciding whether or where to execute a swap — especially when you want Uniswap v3 fee-tier granularity alongside Aerodrome stable/volatile pool pricing in a single ranked response, without triggering any on-chain transaction.

## Known failure modes

- Missing or invalid token_in/token_out address returns a 400 error
- amount_in not matching the numeric pattern (e.g. letters) returns a validation error
- No liquidity found for the token pair returns an empty quotes array or low_liquidity: true
- Token address for an unsupported or non-existent contract returns an error or zero quotes
- Payment not included or insufficient triggers a 402 Payment Required response

## How this service works

Pay-per-call APIs for AI agents over x402: token safety reports, Base and Ethereum on-chain reads, crypto prices, domain checks (DNS, WHOIS, SSL, email), finance data (FX, SEC), worldwide weather forecasts, France alerts, text AI, fun content. USDC on Base, no account, no API key.

## Output

A JSON object containing the best quote (venue name, human-readable and raw amount_out, pool fee percentage, low_liquidity boolean) and a ranked list of all quotes from Uniswap v3 fee tiers and Aerodrome stable/volatile pools, plus the token addresses and network identifier.

## 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": [
      "token_in",
      "token_out",
      "amount_in"
     ],
     "properties": {
      "token_in": {
       "type": "string",
       "maxLength": 42
      },
      "amount_in": {
       "type": "string",
       "pattern": "^[0-9]{1,30}(\\.[0-9]{1,30})?$"
      },
      "token_out": {
       "type": "string",
       "maxLength": 42
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "best": {
   "venue": "Uniswap v3",
   "amount_out": "2528.473174",
   "pool_fee_pct": 0.05,
   "low_liquidity": false,
   "amount_out_raw": "2528473174"
  },
  "quotes": [
   {
    "venue": "Uniswap v3",
    "amount_out": "2528.473174",
    "pool_fee_pct": 0.05,
    "low_liquidity": false,
    "amount_out_raw": "2528473174"
   },
   {
    "pool": "volatile",
    "venue": "Aerodrome",
    "amount_out": "2526.948041",
    "low_liquidity": false,
    "amount_out_raw": "2526948041"
   }
  ],
  "network": "base",
  "token_in": "0x4200000000000000000000000000000000000006",
  "amount_in": "1",
  "token_out": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/allthebot-base-swap-quote-2cb861b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zkrobotics.fr](https://www.zero.xyz/host/api.zkrobotics.fr/llms.txt)
