# Fathom API - Base ERC-20 Token Price Lookup

> Fathom API - Base ERC-20 Token Price Lookup is a paid API for AI agents from fathom-api.mioku-fathom.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns current USD price, liquidity depth, confidence score, main DEX pool, and risk flags for a single Base mainnet ERC-20 token.

## Facts

- Endpoint: GET https://fathom-api.mioku-fathom.workers.dev/v1/price
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fathom-api-base-erc-20-token-price-lookup-a8fa0017
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qrlKbaMVCxln74TaSOSfe

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 fathom-api-base-erc-20-token-price-lookup-a8fa0017
```

Example prompt: What's the current DEX price, liquidity, and confidence score for the Base token at address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base mainnet?

## When to prefer this

Use this endpoint when you need on-chain DEX-derived pricing for a specific Base mainnet ERC-20 token, including liquidity depth, confidence scoring, and risk flags — particularly when you need more than just a price quote and want pool-level detail. Prefer this over centralized price feeds when you need trustless, DEX-native data for Base chain tokens specifically.

## Known failure modes

- Token address not found on Base: status='not_found' with error code and message
- Token exists but has no DEX liquidity: status='no_liquidity'
- RPC connectivity issue with Base node: status='rpc_error'
- Token cannot be priced due to extreme conditions: status='unpriceable'
- Invalid token address format (not a 0x-prefixed 40-char hex): likely 4xx validation error
- Payment not included or insufficient: 402 Payment Required

## How this service works

Returns price, liquidity, confidence score, main pool, and risk flags for a Base ERC-20 token using Base mainnet DEX liquidity.

## Output

Returns a JSON object with the token's USD price (price_usd), 5-minute TWAP (twap_5m), price range (price_low/price_high), total liquidity in USD, a confidence score (0–1), the main DEX pool details (exchange name, pool address, fee tier, pool price and liquidity), a human-readable label, symbol, risk flag array, and a status field indicating ok, not_found, no_liquidity, rpc_error, or unpriceable. Also includes the timestamp of the last update.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "token"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "const": "base",
       "default": "base"
      },
      "token": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Base ERC-20 token address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "token",
      "chain",
      "status"
     ],
     "properties": {
      "twap": {
       "type": "object",
       "required": [
        "price_usd",
        "window_seconds",
        "spot_deviation_bps"
       ],
       "properties": {
        "price_usd": {
         "type": [
          "number",
          "null"
         ]
        },
        "window_seconds": {
         "type": [
          "number",
          "null"
         ],
         "description": "The window actually averaged over, which may differ per DEX."
        },
        "spot_deviation_bps": {
         "type": [
          "number",
          "null"
         ],
         "description": "How far spot sits from the average, in basis points."
        }
       },
       "description": "Time-weighted average price from the main pool's own oracle. Null when the pool cannot answer - commonly a fresh pool whose observation cardinality is still 1."
      },
      "chain": {
       "type": "string"
      },
      "error": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "message": {
         "type": "string"
        }
       }
      },
      "flags": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Risk markers, in two kinds. Measurements about the token: `thin_liquidity`, `no_exit_liquidity` (the largest advertised sale cannot be filled), `possible_manipulation`, `single_pool`, `stale`, `unsellable`. Limits of what could be establis
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fathom-api-base-erc-20-token-price-lookup-a8fa0017/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fathom-api.mioku-fathom.workers.dev](https://www.zero.xyz/host/fathom-api.mioku-fathom.workers.dev/llms.txt)
