Directory / Crypto & onchain data
Fetch an Ethereum block header and transaction hashes by number,…
Fetch an Ethereum block header and transaction hashes by number, tag, or hex via eth_getBlockByNumber
not checked yetBaseGETx402 v2
- Price per call
- $0.003
- Endpoint
- https://api.onesource.io/api/chain/block/:number
- Provider
- api.onesource.io
- Paid calls (30 days)
- 400
- Unique payers (30 days)
- 400
- Last paid call
- 10 days ago
- Health check
- pending
- Pays to
- 0x52E29e0d2Aa49bfBfC548C0A9F2196F4aa51f3ea
- Listed here since
- 2026-11-23 (source: bazaar)
Input
{
"method": "GET",
"pathParams": {
"number": "latest"
},
"queryParams": {
"network": "ethereum"
},
"type": "http"
}
Example output
{
"example": {
"data": {
"result": {
"gasLimit": "0x1c9c380",
"gasUsed": "0xe4e1c0",
"hash": "0x3f5f8b0a8e9b7c6d4f2a1b5e8c9d7a3f6e4b9d1c5a8f2e7b4d6c3a9e1f0b8d5c",
"number": "0x133da1e",
"parentHash": "0x3f5f8b0a8e9b7c6d4f2a1b5e8c9d7a3f6e4b9d1c5a8f2e7b4d6c3a9e1f0b8d5b",
"timestamp": "0x6567c8e0",
"transactions": [
"0xad7e04119ecd85857728205f5b12e95f0bab8e99f9c2f60be5dc79cfc6a8df1f"
]
}
},
"meta": {
"cost_usdc": "0.001",
"endpoint": "/api/chain/block/latest",
"payment_chain": "base",
"payment_token": "USDC",
"request_id": "00000000abcdef01"
}
},
"type": "json"
}
Call it from an agent
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const paidFetch = wrapFetchWithPayment(fetch, account);
const res = await paidFetch("https://api.onesource.io/api/chain/block/:number", { method: "GET" });
console.log(await res.json()); // costs $0.003 in USDC on Base
Machine-readable: /api/tools/1aa38c8b3b0d. Listings are informational; check a provider before sending large amounts.
Similar tools
| Tool | Price / call |
|---|---|
| Pay the send-token execution fee (ERC-20 transfer) Pay the send-token execution fee (ERC-20 transfer) Crypto & onchain datakeyring-agent.blockchhub.linkBase | $0.05 |
| Pay the send-native execution fee (native coin transfer) Pay the send-native execution fee (native coin transfer) Crypto & onchain datakeyring-agent.blockchhub.linkBase | $0.05 |
| ERC20 token balance for any Ethereum wallet ERC20 token balance for any Ethereum wallet - USDC, USDT, DAI, or any token - via balanceOf (eth_call) on OneSource live Ethereum RPC Crypto & onchain dataapi.onesource.ioBase | $0.003 |
| Latest Ethereum block height Latest Ethereum block height - current chain tip via eth_blockNumber Crypto & onchain dataapi.onesource.ioBase | $0.001 |
| Live wallet balance Live wallet balance - native ETH plus up to 20 caller-supplied ERC20 tokens in one bounded RPC batch Crypto & onchain dataapi.onesource.ioBase | $0.003 |