Fetch an EVM block (latest or by number)
Fetch an EVM block (latest or by number). Given a chain and an optional block number returns block number, hash, parent hash, timestamp, transaction count, gas used/limit, base fee and miner. Omit the number for the current block height. For indexers, chain-tip monitoring, finality-tracking and block-explorer agents.
1000 (raw units)
price
3
calls / 30d
3
unique payers
2026-09-17
updated
Provider
agent-commerce-factory-jm.austriaeast.cloudapp.azure.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xCe339395d7f2ea5a5009022EF1C392Fb208a989E",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"chain": "ethereum"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"block": {
"baseFeePerGasWei": "8000000000",
"chain": "ethereum",
"gasLimit": "30000000",
"gasUsed": "12000000",
"hash": "0xabc...",
"miner": "0x1111111111111111111111111111111111111111",
"number": 21000000,
"parentHash": "0xdef...",
"timestamp": "2026-08-25T12:00:00.000Z",
"timestampUnix": 1787083200,
"txCount": 120
},
"chain": "ethereum",
"machine": "portfolio",
"route": "onchain.block"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"block": {
"description": "Block number; omit for the latest block.",
"minimum": 0,
"type": "integer"
},
"chain": {
"default": "ethereum",
"description": "EVM chain (ethereum, base, arbitrum, optimism, polygon, bsc).",
"type": "string"
}
},
"required": [],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"block": {
"properties": {
"baseFeePerGasWei": {
"type": [
"string",
"null"
]
},
"chain": {
"type": [
"string",
"null"
]
},
"gasLimit": {
"type": [
"string",
"null"
]
},
"gasUsed": {
"type": [
"string",
"null"
]
},
"hash": {
"type": [
"string",
"null"
]
},
"miner": {
"type": [
"string",
"null"
]
},
"number": {
"type": [
"integer",
"null"
]
},
"parentHash": {
"type": [
"string",
"null"
]
},
"timestamp": {
"type": [
"string",
"null"
]
},
"timestampUnix": {
"type": [
"integer",
"null"
]
},
"txCount": {
"type": [
"integer",
"null"
]
}
},
"type": "object"
},
"chain": {
"type": "string"
},
"economics": {
"properties": {
"sellPriceUsd": {
"type": "number"
},
"upstreamCostUsdActual": {
"type": [
"number",
"null"
]
}
},
"type": "object"
},
"machine": {
"type": "string"
},
"route": {
"type": "string"
}
},
"required": [
"machine",
"route",
"block"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/onchain/block" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/onchain/block");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/onchain/block")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/7415.json, and this resource appears in /discovery/resources and /discovery/search.