# BasePrice Oracle x402

> BasePrice Oracle x402 is a paid API for AI agents from baseprice-x402.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-18).

Returns real-time DEX spot price, liquidity, and 24h volume for a given token on Base Mainnet (Chain ID 8453), payable via x402 micropayment.

## Facts

- Endpoint: GET https://baseprice-x402.vercel.app/v1/price
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/baseprice-oracle-x402-6edff68c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LSw7-cRUO05AWi-fZoMkY

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 baseprice-oracle-x402-6edff68c
```

Example prompt: What is the current spot price of WETH in USD on Base mainnet right now, including its liquidity and 24h trading volume?

## When to prefer this

Use this endpoint when you need real-time, on-chain DEX spot prices specifically for tokens on Base Mainnet (Chain ID 8453), and you want liquidity and volume context alongside the price. Prefer this over general CEX price APIs when you need decentralized, on-chain accuracy for Base network assets. Best suited for DeFi agents, portfolio trackers, swap optimizers, or arbitrage bots operating on Base.

## Known failure modes

- Unknown or unsupported token symbol returns an error or empty token object
- Network congestion on Base may cause stale or delayed price data
- Invalid quote currency returns a validation error
- Payment failure via x402 (insufficient USDC balance or wrong network) results in 402 response and no data
- Rate limiting if x402 payment not properly submitted

## How this service works

Real-Time DEX Spot Price & Swap Quoter Oracle for Base Mainnet (Chain ID 8453), payable via x402.

## Output

Returns a JSON object containing the token's current spot price in USD, available liquidity in USD, 24-hour trading volume in USD, the network identifier (Base Mainnet), a timestamp of the data, and token metadata — all sourced from live DEX data on Base (Chain ID 8453).

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "title": "PriceRequest",
     "properties": {
      "quote": {
       "enum": [
        "USD",
        "USDC"
       ],
       "type": "string",
       "title": "Quote",
       "default": "USD"
      },
      "token": {
       "type": "string",
       "title": "Token",
       "default": "WETH",
       "maxLength": 42,
       "minLength": 1,
       "description": "Known symbol or EVM address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "price_usd",
      "token",
      "source",
      "fetched_at"
     ],
     "properties": {
      "dex": {
       "type": [
        "string",
        "null"
       ]
      },
      "token": {
       "type": "object",
       "required": [
        "address",
        "symbol"
       ],
       "properties": {
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "symbol": {
         "type": "string"
        },
        "address": {
         "type": "string",
         "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "decimals": {
         "type": [
          "integer",
          "null"
         ],
         "maximum": 255,
         "minimum": 0
        }
       }
      },
      "source": {
       "type": "string"
      },
      "network": {
       "const": "base-mainnet"
      },
      "success": {
       "type": "boolean"
      },
      "price_usd": {
       "type": "number"
      },
      "timestamp": {
       "type": "string",
       "format": "date-time"
      },
      "fetched_at": {
       "type": "string",
       "format": "date-time"
      },
      "pair_address": {
       "type": [
        "string",
        "null"
       ]
      },
      "quote_source": {
       "type": "string"
      },
      "liquidity_usd": {
       "type": [
        "number",
        "null"
       ],
       "minimum": 0
      },
      "price_in_quote": {
       "type": "number"
      },
      "quote_currency": {
       "enum": [
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token": {
   "type": "object"
  },
  "network": {
   "type": "string"
  },
  "price_usd": {
   "type": "number"
  },
  "timestamp": {
   "type": "string"
  },
  "liquidity_usd": {
   "type": "number"
  },
  "volume_24h_usd": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/baseprice-oracle-x402-6edff68c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from baseprice-x402.vercel.app](https://www.zero.xyz/host/baseprice-x402.vercel.app/llms.txt)
