Skip to main content

getECBlock

Retrieves the Economic Cluster (EC) block ID and height for a given timestamp. The EC block is used for transaction validation and is the earliest block with a timestamp greater than or equal to the provided timestamp.

Endpoint

GET /nxt?requestType=getECBlock

Parameters

NameTypeRequiredDefaultDescription
timestampintNoCurrent epoch timeBlock timestamp

Request Example

curl "http://localhost:22024/nxt?requestType=getECBlock&timestamp=123456789"

Response

{
"ecBlockId": "12345678901234567890",
"ecBlockHeight": 1000000,
"timestamp": 123456789,
"requestProcessingTime": 1
}

Response Fields

FieldTypeDescription
ecBlockIdstringEC block ID
ecBlockHeightnumberEC block height
timestampnumberThe timestamp used to find the EC block
requestProcessingTimenumberAPI request processing time in milliseconds

Source

GetECBlock.java

Tags

BLOCKS