# x402 Block Number Oracle

> x402 Block Number Oracle is a paid API for AI agents from x402-v2-mint-block-number.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-12-03).

Returns the latest block number for Base and/or Ethereum networks, with optional tip timestamp, cached ~2 seconds.

## Facts

- Endpoint: POST https://x402-v2-mint-block-number.vercel.app/v1/block-number?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-block-number-oracle-15f5bf6d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N6AgcSyyUFURjw-3qMA6K

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 x402-block-number-oracle-15f5bf6d -d '<json body>'
```

Example prompt: What's the current block number on Base right now? Also grab Ethereum's latest block number and include the timestamp.

## When to prefer this

Choose this endpoint when an AI agent needs fast, low-cost (~$0.001 USDC) access to the current block number on Base or Ethereum without managing its own RPC node. It is ideal for lightweight onchain timing checks, event sequencing, or block-height-aware logic inside agent workflows. The ~2s cache makes it suitable for near-real-time needs without paying for raw RPC access.

## Known failure modes

- Invalid chain value (not 'base' or 'ethereum') returns a validation error
- Empty chains array or more than 2 chains fails schema validation
- Payment failure (x402 protocol) results in 402 response before data is returned
- Upstream RPC node downtime may cause stale or missing block data
- Network timeout on Vercel edge may return a 5xx error

## How this service works

Latest eth_blockNumber for Base and/or Ethereum; optional tip timestamp. ~2s cache. Amp port.

## Output

A JSON object containing the latest block number(s) for the requested chain(s) (Base and/or Ethereum), a skill identifier ('block-number'), an 'ok' boolean status, a 'charged' flag indicating the payment was processed, and optionally a tip timestamp. The response is sourced from a cache refreshed approximately every 2 seconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chains": {
   "type": "array",
   "items": {
    "enum": [
     "base",
     "ethereum"
    ],
    "type": "string"
   },
   "default": [
    "base"
   ],
   "maxItems": 2,
   "minItems": 1,
   "uniqueItems": true
  },
  "request_id": {
   "type": "string"
  },
  "include_timestamp": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "block-number",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-block-number-oracle-15f5bf6d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-block-number.vercel.app](https://www.zero.xyz/host/x402-v2-mint-block-number.vercel.app/llms.txt)
