Reproducible block reads
Use an explicit block_number or finalized block hash when a query must be repeatable.
latest, safe, and finalized are moving tags whose referenced block can change between runs.
Returns block metadata for a block number, tag, or hash. Set include_transactions to request expanded transaction objects in transactions_full; otherwise transactions contains hashes.
Needs RPC · RPC required
Exact signatures with descriptions, requirements, inputs, returns, and examples.
get_block(CLIENT) # RPC required Returns the provider's latest block with transaction hashes but without expanded transaction objects.
| Name | Type | Use |
|---|---|---|
client | CLIENT Attached live CLIENT for the chain containing the requested block. | required positional |
| Name | Type |
|---|---|
hash | BYTES32 Block hash. |
parent_hash | BYTES32 Parent block hash. |
miner | ADDRESS Execution-fee recipient. |
number | BLOCK_NUMBER Block height. |
timestamp | TIMESTAMP Block time in UTC. |
Block metadata row. Returns one block row. transactions contains transaction hashes; transactions_full contains expanded transaction objects when include_transactions is true.
Use an explicit block_number or finalized block hash when a query must be repeatable.
latest, safe, and finalized are moving tags whose referenced block can change between runs.
The default overload returns transaction hashes in transactions.
Set include_transactions to true and read transactions_full when sender, recipient, value, fee, or calldata fields are required.
When include_transactions is false, use transactions for transaction hashes.
When include_transactions is true, use transactions_full for expanded transaction objects.
get_block(CLIENT, BIGINT) # RPC required Returns the block at an exact decimal height with transaction hashes only.
| Name | Type | Use |
|---|---|---|
client | CLIENT Attached live CLIENT for the chain containing the requested block. | required positional |
block_number | BIGINT Block height, canonical tag such as latest or finalized, or a 0x-prefixed block hash. | required positional |
| Name | Type |
|---|---|
hash | BYTES32 Block hash. |
parent_hash | BYTES32 Parent block hash. |
miner | ADDRESS Execution-fee recipient. |
number | BLOCK_NUMBER Block height. |
timestamp | TIMESTAMP Block time in UTC. |
get_block(CLIENT, VARCHAR) # RPC required Returns a block selected by a canonical tag or 0x-prefixed hash, with transaction hashes only.
| Name | Type | Use |
|---|---|---|
client | CLIENT Attached live CLIENT for the chain containing the requested block. | required positional |
block_tag_or_hash | VARCHAR Block height, canonical tag such as latest or finalized, or a 0x-prefixed block hash. | required positional |
| Name | Type |
|---|---|
hash | BYTES32 Block hash. |
parent_hash | BYTES32 Parent block hash. |
miner | ADDRESS Execution-fee recipient. |
number | BLOCK_NUMBER Block height. |
timestamp | TIMESTAMP Block time in UTC. |
Named parameters · RPC required
get_block(CLIENT, BIGINT, BOOLEAN) # RPC required Returns a block by exact height and optionally populates transactions_full with expanded transaction objects.
| Name | Type | Use |
|---|---|---|
client | CLIENT Attached live CLIENT for the chain containing the requested block. | required positional |
block_number | BIGINT Block height, canonical tag such as latest or finalized, or a 0x-prefixed block hash. | required positional |
include_transactions | BOOLEAN When true, request expanded transaction objects in transactions_full. When false, transactions contains hashes. | required positional |
| Name | Type |
|---|---|
hash | BYTES32 Block hash. |
parent_hash | BYTES32 Parent block hash. |
miner | ADDRESS Execution-fee recipient. |
number | BLOCK_NUMBER Block height. |
timestamp | TIMESTAMP Block time in UTC. |
Named parameters · RPC required
get_block(CLIENT, VARCHAR, BOOLEAN) # RPC required Returns a tag- or hash-selected block and optionally populates transactions_full with expanded transaction objects.
| Name | Type | Use |
|---|---|---|
client | CLIENT Attached live CLIENT for the chain containing the requested block. | required positional |
block_tag_or_hash | VARCHAR Block height, canonical tag such as latest or finalized, or a 0x-prefixed block hash. | required positional |
include_transactions | BOOLEAN When true, request expanded transaction objects in transactions_full. When false, transactions contains hashes. | required positional |
| Name | Type |
|---|---|
hash | BYTES32 Block hash. |
parent_hash | BYTES32 Parent block hash. |
miner | ADDRESS Execution-fee recipient. |
number | BLOCK_NUMBER Block height. |
timestamp | TIMESTAMP Block time in UTC. |