For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getBlockByNumber - Flashblocks

Example code for the eth_getBlockByNumber Flashblocks method. Complete guide on how to use eth_getBlockByNumber Flashblocks in GetBlock Web3 documentation.

This returns the current in-progress Flashblock when called with "pending" — including every transaction that has landed in Flashblocks since the last block sealed. Pass true as the second parameter for full transaction objects; false for hashes only. When called with "latest", returns the last sealed block as usual. Preconfirmed Flashblocks are distinguishable from finalized blocks by their zero stateRoot and by the absence of a final block hash.

Parameters

Parameter
Type
Required
Description

blockNumber

QUANTITY

TAG

Yes

fullTransactions

boolean

Yes

true for full transaction objects, false for hashes only

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockByNumber",
    "params": [
        "pending",
        false
    ],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.number

QUANTITY

In-progress block number (the same as the next latest will be)

result.hash

DATA

null for Flashblocks (block not yet sealed) — a real hash appears only after seal

result.parentHash

DATA

Parent block hash (last sealed block)

result.stateRoot

DATA

Zero hash on Flashblocks (state not yet committed); real root when block seals

result.transactions

array

Every transaction preconfirmed into Flashblocks so far in this in-progress block

result.timestamp

QUANTITY

Timestamp of the in-progress block

Use Cases

  • Fast block scanning — read the current preconfirmed state up to 1.8 seconds before the block seals

  • Building real-time DeFi dashboards that show transactions as they land

  • MEV analysis — inspecting sequencer-ordered transactions before finalization

  • Detecting the current Flashblock index to time downstream operations

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

-32000

Sequencer unavailable

Flashblocks stream is temporarily down — response falls back to latest state

SDK Integration

Last updated

Was this helpful?