Skip to main content

GetForging

Retrieves forging status for a specific account (via secretPhrase/privateKey/publicKey) or all active generators on the network.

Request​

GET /nxt?requestType=getForging

All endpoints use port 22024 by default.

Parameters​

NameTypeDescriptionRequired
secretPhrasestringSecret passphrase for accountNo
privateKeystringPrivate key for accountNo
publicKeystringPublic key for accountNo
adminPasswordstringAdmin password to get all generatorsNo

Response​

When querying specific account:

{
"generator": {
"account": "1234567890123456789",
"accountRS": "SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"deadline": 120,
"hitTime": 45,
"targetDeadline": 120,
"effectiveBalanceFQT": "10000000000000000",
"blocksmithsCount": 1,
"hitTimeElapsd": 30
},
"errorCode": 0,
"errorDescription": ""
}

When querying all generators (adminPassword):

{
"generators": [
{
"account": "1234567890123456789",
"accountRS": "SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"deadline": 120,
"hitTime": 45,
"targetDeadline": 120,
"effectiveBalanceFQT": "10000000000000000",
"blocksmithsCount": 1,
"hitTimeElapsd": 30
}
],
"errorCode": 0,
"errorDescription": ""
}

Example​

# Get forging status for specific account
curl "http://localhost:22024/nxt?requestType=getForging&secretPhrase=your_secret_passphrase"

# Get all generators (requires admin password)
curl "http://localhost:22024/nxt?requestType=getForging&adminPassword=admin_password"