# OneSource Ethereum Block Number RPC

> OneSource Ethereum Block Number RPC is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-16).

Returns the current latest block number for Ethereum mainnet or Sepolia testnet from OneSource-operated nodes

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/block-number
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-ethereum-block-number-rpc-b38fffe5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N-PpkhmQWQCD9RAfk1Dwc

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 onesource-ethereum-block-number-rpc-b38fffe5
```

Example prompt: What's the current block number on Ethereum mainnet right now?

## When to prefer this

Use this endpoint when an AI agent needs real-time Ethereum chain head data without managing API keys, and wants to pay per call using USDC on Base via x402 or pathUSD/USDC.e on Tempo. Ideal for agents that need lightweight block height checks on mainnet or Sepolia testnet as a building block for polling, confirmation tracking, or chain sync verification.

## Known failure modes

- Invalid network enum value returns an error — only 'ethereum' and 'sepolia' are accepted
- Payment failure via x402 (USDC on Base) prevents the call from being processed
- Node unavailability or network outage may cause timeouts or 5xx errors
- Hex block number may confuse consumers expecting a decimal integer — conversion required

## How this service works

Latest Ethereum block height - current chain tip via eth_blockNumber

## Output

A JSON object containing the network name (e.g. 'ethereum') and the current block number as a hex string (e.g. '0x133da1e'), representing the latest confirmed block on the requested Ethereum network.

## Example request

```json
{
 "network": "sepolia"
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "result": {
         "type": "string"
        }
       },
       "description": "Endpoint-specific response payload"
      },
      "meta": {
       "type": "object",
       "required": [
        "endpoint",
        "request_id"
       ],
       "properties": {
        "endpoint": {
         "type": "string"
        },
        "cost_usdc": {
         "type": "string"
        },
        "request_id": {
         "type": "string"
        },
        "payment_chain": {
         "type": "string"
        },
        "payment_token": {
         "type": "string"
        }
       }
      },
      "error": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "code": {
         "type": "integer"
        },
        "message": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "result": "0x133da1e"
  },
  "meta": {
   "endpoint": "/api/chain/block-number",
   "cost_usdc": "0.001",
   "request_id": "00000000abcdef01",
   "payment_chain": "base",
   "payment_token": "USDC"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-ethereum-block-number-rpc-b38fffe5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
