# Base Onchain Spot Price Oracle

> Base Onchain Spot Price Oracle is a paid API for AI agents from x402-data-api.bodhinindustries.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns live USD spot prices for up to 15 Base chain tokens, computed directly from on-chain Uniswap V3 quoters with no third-party data dependencies.

## Facts

- Endpoint: GET https://x402-data-api.bodhinindustries.workers.dev/spot
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-onchain-spot-price-oracle-17dc9af3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kwByJMwfOjxXawAPPQWj_

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 base-onchain-spot-price-oracle-17dc9af3
```

Example prompt: Can you get me the current on-chain USD spot prices for these Base tokens directly from the blockchain — 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, 0x4200000000000000000000000000000000000006, and eth — using Uniswap V3 quoters, no third-party data?

## When to prefer this

Choose this endpoint when you need manipulation-resistant, on-chain computed USD prices for Base tokens with no reliance on third-party price feeds or off-chain oracles. Ideal for DeFi agents, risk auditors, or any workflow where trustless price sourcing from raw Base chain state is required. Prefer over centralized price APIs when verifiability and independence from third-party data matter.

## Known failure modes

- Token address not found on Base — priced:false and source:no_pool returned
- More than 15 tokens supplied — request may be rejected or truncated
- Invalid address format — may return an error or unpriced result
- Token has no Uniswap V3 pool — no price available, source set to no_pool
- Payment not provided or insufficient — x402 payment required error
- Network congestion on Base causing delayed block data

## How this service works

Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.

## Output

A JSON object containing the Base block height at query time, an ISO-8601 timestamp, the shared ETH/USD price, and an array of per-token results each with the token address, USD price, symbol, fee tier used, and the pricing method (quoter_v2, quoter_v2_weth_hop, stablecoin_ref, or no_pool). Also includes total tokens processed and count of successfully priced tokens, with thirdPartyDataUsed always false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "tokens"
 ],
 "properties": {
  "tokens": {
   "type": "string",
   "description": "Comma-separated up to 15 Base token addresses; use 'eth' for native ETH."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "block": {
   "type": "integer",
   "description": "Base block height"
  },
  "count": {
   "type": "integer",
   "description": "tokens processed"
  },
  "prices": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "token": {
      "type": "string",
      "description": "address or 'native'"
     },
     "priced": {
      "type": "boolean",
      "description": "could be priced"
     },
     "source": {
      "type": "string",
      "description": "quoter_v2 | quoter_v2_weth_hop | stablecoin_ref | no_pool"
     },
     "symbol": {
      "type": "string",
      "description": "symbol"
     },
     "feeTier": {
      "type": "integer",
      "description": "fee tier used (or null)"
     },
     "priceUsd": {
      "type": "number",
      "description": "USD per token (or null)"
     }
    }
   }
  },
  "computedAt": {
   "type": "string",
   "description": "ISO-8601 timestamp"
  },
  "ethPriceUsd": {
   "type": "number",
   "description": "shared ETH/USD"
  },
  "pricedCount": {
   "type": "integer",
   "description": "priced"
  },
  "thirdPartyDataUsed": {
   "type": "boolean",
   "description": "always false"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-onchain-spot-price-oracle-17dc9af3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.bodhinindustries.workers.dev](https://www.zero.xyz/host/x402-data-api.bodhinindustries.workers.dev/llms.txt)
