# OneSource Ethereum Block by Number

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

Fetches an Ethereum block header and transaction hashes by block number, tag (latest/pending/earliest), or hex value via eth_getBlockByNumber

## Facts

- Endpoint: GET https://skills.onesource.io/api/chain/block/latest
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-0c75abac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nFGp7iN70n8V9VvjWoUig

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 skills-onesource-io-0c75abac
```

Example prompt: What does the latest Ethereum block look like — can you pull the block header and transaction hashes from the mainnet right now?

## When to prefer this

Use this endpoint when you need to inspect Ethereum-compatible block headers or enumerate transactions in a specific block by number, tag, or hex. Ideal for agents monitoring chain progress, verifying block finality, or cross-referencing transaction inclusion across supported networks including Ethereum, Base, Avalanche, Sepolia, and MegaETH.

## Known failure modes

- Invalid block number or hex format returns an error
- Block tag not supported on selected network
- Network enum value not recognized
- Block not yet mined (pending may return null)
- RPC node unavailable or timeout

## How this service works

Returns the latest block on the chain.

## Output

Returns a block header including fields such as block number, hash, parent hash, timestamp, miner, gas used, gas limit, base fee, and a list of transaction hashes included in the block.

## Example request

```json
{
 "number": "latest",
 "network": "ethereum"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "number": {
   "oneOf": [
    {
     "type": "integer",
     "minimum": 0
    },
    {
     "enum": [
      "latest",
      "pending",
      "earliest",
      "safe",
      "finalized"
     ],
     "type": "string"
    },
    {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]+$"
    }
   ]
  },
  "network": {
   "enum": [
    "ethereum",
    "sepolia",
    "avax",
    "megaeth",
    "megaeth-testnet",
    "base"
   ],
   "type": "string",
   "default": "ethereum"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-0c75abac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from skills.onesource.io](https://www.zero.xyz/host/skills.onesource.io/llms.txt)
