Directory / Compute, code & dev tools
EVM network info
EVM network info - chain ID, block height, gas price, chain head age, and chain characteristics in one batched RPC call (eth_chainId + eth_blockNumber + eth_gasPrice + latest block header)
402 OKBaseGETx402 v2
- Price per call
- $0.001
- Endpoint
- https://api.onesource.io/api/chain/network-info
- Provider
- api.onesource.io
- Paid calls (30 days)
- 389
- Unique payers (30 days)
- 365
- Last paid call
- 12 h ago
- Health check
- HTTP 402 8 min ago
- Pays to
- 0x52E29e0d2Aa49bfBfC548C0A9F2196F4aa51f3ea
- Listed here since
- 2026-11-23 (source: bazaar)
Input
{
"method": "GET",
"queryParams": {
"network": "ethereum"
},
"type": "http"
}
Example output
{
"example": {
"data": {
"block_number": "0x133da1e",
"chain": {
"avg_block_time_ms": 12000,
"chain_id": 1,
"ens": true,
"finality": "beacon",
"indexed": true,
"layer": 1,
"mempool": true,
"native_currency": "ETH",
"stack": "ethereum"
},
"chain_id": "0x1",
"gas_price": "0x4a817c800",
"head_age_seconds": 9,
"head_timestamp": 1754240345,
"net_version": "1",
"network": "ethereum",
"stale": false,
"stale_after_seconds": 1200
},
"meta": {
"cost_usdc": "0.001",
"endpoint": "/api/chain/network-info",
"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/network-info", { method: "GET" });
console.log(await res.json()); // costs $0.001 in USDC on Base
Machine-readable: /api/tools/46c2e8657f38. Listings are informational; check a provider before sending large amounts.