Skip to main content
Returns information about a block by its block number.

Parameters

blockParameter
string
required
Block number in hexadecimal, or a block tag: latest, earliest, pending, safe, or finalized.
fullTransactions
boolean
required
If true, returns full transaction objects in the transactions array. If false, returns only transaction hashes.

Returns

result
object | null
A block object, or null if no block was found.

Flashblocks Behavior

On a Flashblocks-aware endpoint, use "pending" as the block parameter to query preconfirmed state — data available up to 200ms before the next full block is sealed. When called with "pending", returns the current Flashblock — the block actively being built with preconfirmed transactions, sealed approximately every 200ms.
curl https://mainnet-preconf.base.org \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending",false],"id":1}'

Example

{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["latest", false],
  "id": 1
}