block by height - Movement

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

ParameterTypeDescription
block_heightstringBlock height

Query Parameters

ParameterTypeDescription
with_transactionsstringInclude 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

FieldTypeDescription
block_heightstringBlock height
first_versionstringFirst transaction version in the block
last_versionstringLast transaction version in the block
block_timestampstringBlock time (microseconds)

Use Cases

  • Indexing: Ingest blocks and their version ranges
  • Explorers: Render block contents by height

Error Handling

ErrorMessageDescription
400 / Bad requestBad requestA path, query, or body parameter was invalid
404 / Not foundNot foundThe account, block, transaction, or resource does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect