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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Numeric ID to convert. Can be positive or negative. |
Response
{
"stringId": "1234567890123456789",
"longId": "1234567890123456789"
}
Response Fields
| Field | Type | Description |
|---|---|---|
stringId | string | Unsigned string representation of the ID. |
longId | string | Signed long representation of the ID. |
Error Responses
| Condition | Response |
|---|---|
| ID exceeds 64-bit range | JSONResponses.OVERFLOW |
id parameter missing | Empty 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"