Skip to main content

GetAccountBlocks

Returns blocks forged by a specific account, optionally filtered by timestamp.

Request​

GET /nxt?requestType=get-account-blocks

All endpoints use port 22024 by default.

Parameters​

NameTypeDescriptionRequired
accountstringAccount ID or SHAMWARI addressYes
timestampintFilter blocks newer than timestampOptional
firstIndexintPagination start indexOptional
lastIndexintPagination end indexOptional
includeTransactionsbooleanInclude transaction details in blocksOptional

Response​

{
"blocks": [
{
"block": "1234567890",
"height": 250,
"timestamp": 123456789,
"generator": "1234567890",
"generatorRS": "SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"numberOfTransactions": 5,
"blockSignature": "abc123..."
}
]
}

Response Fields​

FieldTypeDescription
blockstringBlock ID
heightintBlock height
timestampintBlock timestamp
generatorstringGenerator account ID
generatorRSstringGenerator's SHAMWARI address
numberOfTransactionsintNumber of transactions in block
blockSignaturestringBlock signature (hex)

Error Codes​

CodeDescription
3Unknown account

Example​

curl "http://localhost:22024/nxt?requestType=get-account-blocks&account=SHAMWARI-ABCD-EFGH-IJKL-MNOPQ"