Skip to main content

getTime

Retrieves the current server time in both epoch time (seconds since genesis block epoch) and Unix time (seconds since 1970-01-01 UTC).

Endpoint

GET /nxt?requestType=getTime

Parameters

None

Request Example

curl "http://localhost:22024/nxt?requestType=getTime"

Response

{
"time": 123456789,
"unixtime": 1609459200,
"requestProcessingTime": 0
}

Response Fields

FieldTypeDescription
timenumberEpoch time (seconds since genesis block epoch)
unixtimenumberUnix timestamp (seconds since 1970-01-01 UTC)
requestProcessingTimenumberAPI request processing time in milliseconds

Source

GetTime.java

Tags

INFO