Skip to main content

Long Convert

Converts between numeric (signed long) and unsigned string ID representations. Handles values in the range [-2^63, 2^63-1]. Out of range values return an overflow error.

Request

GET /nxt?requestType=longConvert&id=<id>

Parameters

NameTypeRequiredDescription
idstringYesNumeric ID to convert. Can be positive or negative.

Response

{
"stringId": "1234567890123456789",
"longId": "1234567890123456789"
}

Response Fields

FieldTypeDescription
stringIdstringUnsigned string representation of the ID.
longIdstringSigned long representation of the ID.

Error Responses

ConditionResponse
ID exceeds 64-bit rangeJSONResponses.OVERFLOW
id parameter missingEmpty response (JSON.emptyJSON)

Notes

  • This endpoint does not require the blockchain to be running (requireBlockchain = false).
  • Not chain-specific.
  • Does not require admin password authentication (requirePassword = false).

Source: LongConvert.java.

Example

curl "http://localhost:22024/nxt?requestType=longConvert&id=1234567890123456789"