Blocks
Overview
The Block endpoints in the Hedera Mirror Node REST API allows developers to query block data on the Hedera network. These endpoints are essential for retrieving block metadata, including hashes, timestamps, and transactions within blocks.
Endpoints
The following Block endpoints are available:
Endpoint
Description
GET /api/v1/blocks
Retrieves a list of blocks on the network.
GET /api/v1/blocks/{hash_or_number}
Fetches details of a specific block by hash or block number.
Blocks
List blocks
Returns a list of blocks on the network.
/api/v1/blocks
The block's number
^((eq|gt|gte|lt|lte):)?\d{1,19}$
The maximum number of items to return
2
The order in which items are listed
asc
asc
, desc
The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
Get block by hash or number
Returns the block information by given hash or number.
/api/v1/blocks/{hashOrNumber}
Accepts both eth and hedera hash format or block number
^(\d{1,10}|(0x)?([A-Fa-f0-9]{64}|[A-Fa-f0-9]{96}))$
Last updated
Was this helpful?