Skip to main content

getBlockId

Retrieves the block ID (as an unsigned 64-bit number) at a specific height.

Endpoint

GET /nxt?requestType=getBlockId

Parameters

NameTypeRequiredDescription
heightintYesBlock height

Request Example

curl "http://localhost:22024/nxt?requestType=getBlockId&height=1000000"

Response

{
"block": "12345678901234567890",
"requestProcessingTime": 1
}

Response Fields

FieldTypeDescription
blockstringBlock ID as an unsigned integer (decimal string)
requestProcessingTimenumberAPI request processing time in milliseconds

Errors

ErrorDescription
MISSING_HEIGHTThe height parameter was not provided
INCORRECT_HEIGHTThe height value is not a valid integer or is out of range

Source

GetBlockId.java

Tags

BLOCKS