Returns a block by its height, including its first and last transaction versions, timestamp, and optionally the full transactions it contains.
Endpoint
httpGET /v1/blocks/by_height/{block_height}
Path Parameters
| Parameter | Type | Description |
|---|
| block_height | string | Block height |
Query Parameters
| Parameter | Type | Description |
|---|
| with_transactions | string | Include full transactions in the block (true/false) |
Example
bashexport MOVEMENT_REST=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/
curl "${MOVEMENT_REST}v1/blocks/by_height/120000000?with_transactions=false"
Response
json{
"block_height": "120000000",
"block_hash": "0x7md...",
"block_timestamp": "1736772000000000",
"first_version": "285000000",
"last_version": "285000003",
"transactions": null
}
Response Fields
| Field | Type | Description |
|---|
| block_height | string | Block height |
| first_version | string | First transaction version in the block |
| last_version | string | Last transaction version in the block |
| block_timestamp | string | Block time (microseconds) |
Use Cases
- Indexing: Ingest blocks and their version ranges
- Explorers: Render block contents by height
Error Handling
| Error | Message | Description |
|---|
| 400 / Bad request | Bad request | A path, query, or body parameter was invalid |
| 404 / Not found | Not found | The account, block, transaction, or resource does not exist |
| 403 / RBAC: access denied | Access denied | The GetBlock access token is missing or incorrect |