eth_getBlockByNumber
PolygonC1Returns block information by number. The second parameter controls whether transactions are returned as full objects (true) or just hashes (false).
Endpoint
POST https://api.1st-node.com/v1/polygon/rpcParameters
| Name | Type | Description |
|---|---|---|
| block | QUANTITY | TAG | Block number or tag. |
| fullTx | Boolean | true for full transaction objects, false for hashes. |
Returns
Object — the block header, transactions and metadata, or null if not found.
Request
curl https://api.1st-node.com/v1/polygon/rpc \
-H "Authorization: Bearer $ONE_KEY" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByNumber",
"params": ["latest", false]
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByNumber",
"params": ["latest", false]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": { "number": "0x12d4e2a", "hash": "0x…", "transactions": ["0x…"] }
}More blocks methods on Polygon
Frequently asked
Can I fetch old blocks?
Yes — any historic block is available from archive nodes.
Top up, get a key, ship.
Self-serve. Pay in crypto or card. Metered by credits — heavy primitives cost more, simple ones are cheap.
Get API key