JSON-RPCMethods
eth_getBlockByNumber: parameters, returns and CU
Return a block by number, optionally with full transactions.
Summary
Return a block by its number, optionally with full transaction objects.
Compute units (CU) and pricing
CU per call
5 CU
Price per 1M calls (USD)
$0.50
Parameters
| Parameter | Type | Description |
|---|---|---|
blockParameter | QUANTITY|TAG | Block number or tag: latest, earliest, pending, safe or finalized. |
fullTransactions | boolean | true returns full transaction objects; false returns only the list of transaction hashes. |
Returns
- Type:
OBJECT|NULL - Description: Block object with header fields and a transaction list; null when the block is not found.
Notes
The blocks behind the latest, pending, safe and finalized tags change as the chain advances.
Request example
export BLOCKVECTRA_API_KEY=rgw_your_api_key
curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H "x-api-key: $BLOCKVECTRA_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"latest",
false
],
"id": 1
}'Supported chains
Available on all 29 supported chains.
Related references
Last updated: