⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_getBlockByNumber

Returns information about a block by block number.

Parameters

  1. Block Parameter - Block number or "latest", "earliest", "pending"
  2. Boolean - If true returns full transaction objects, if false only hashes
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x1b4", true],
"id": 1
}

Returns

Block object or null if no block found.

Implementation Examples

curl -X POST https://api-tron-jsonrpc.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}'