# 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 and swap quote data for tokens on Base Mainnet (Chain ID 8453), paid per-call via x402.

## Facts

- Endpoint: GET https://baseprice-x402.vercel.app/v1/quote
- 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-c09a84dd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AfDeMa9_ochfqWS-iWyf-

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-c09a84dd
```

Example prompt: What's the current DEX spot price of WETH quoted in USD on Base Mainnet right now, including its liquidity and 24h volume?

## When to prefer this

Choose this endpoint when you need real-time, on-chain DEX spot prices specifically for tokens on Base Mainnet (Chain ID 8453) and are operating in a pay-per-call x402 micropayment context. It is ideal for DeFi agents, arbitrage bots, portfolio trackers, and swap estimators that require fresh liquidity-pool-sourced prices rather than centralized exchange data or off-chain aggregators.

## Known failure modes

- Payment not submitted or invalid x402 payment header returns 402 Payment Required
- Unsupported or unrecognized token symbol returns an error or empty token object
- Token has insufficient liquidity on Base DEX, resulting in unreliable or missing price data
- Network connectivity issues to Base Mainnet RPC may cause stale or failed price fetches
- Invalid quote currency specified may return unexpected results

## How this service works

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

## Output

A JSON object containing the token's current spot price in USD, network identifier (Base Mainnet), liquidity depth in USD, 24-hour trading volume in USD, a timestamp of the quote, and token metadata — sourced from live DEX pools 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": "QuoteRequest",
     "properties": {
      "amount": {
       "anyOf": [
        {
         "type": "number",
         "maximum": 1000000000000,
         "exclusiveMinimum": 0
        },
        {
         "type": "string"
        }
       ],
       "title": "Amount",
       "default": "1"
      },
      "to_token": {
       "type": "string",
       "title": "To Token",
       "default": "USDC",
       "maxLength": 42,
       "minLength": 1
      },
      "from_token": {
       "type": "string",
       "title": "From Token",
       "default": "WETH",
       "maxLength": 42,
       "minLength": 1
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "quote_type",
      "executable",
      "expected_out"
     ],
     "properties": {
      "network": {
       "const": "base-mainnet"
      },
      "success": {
       "type": "boolean"
      },
      "to_token": {
       "type": "object",
       "required": [
        "address",
        "symbol",
        "price_usd",
        "source",
        "fetched_at"
       ],
       "properties": {
        "source": {
         "type": "string"
        },
        "symbol": {
         "type": "string"
        },
        "address": {
         "type": "string",
         "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "price_usd": {
         "type": "number",
         "exclusiveMinimum": 0
        },
        "fetched_at": {
         "type": "string",
         "format": "date-time"
        }
       }
      },
      "amount_in": {
       "type": "number",
       "maximum": 1000000000000,
       "exclusiveMinimum": 0
      },
      "timestamp": {
       "type": "string",
       "format": "date-time"
      },
      "executable": {
       "const": false
      },
      "from_token": {
       "type": "object",
       "required": [
        "address",
        "symbol",
        "price_usd",
        "source",
        "fetched_at"
       ],
       "properties": {
   
… (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-c09a84dd/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)
