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
| Name | Type | Description | Required |
|---|---|---|---|
account | string | Account ID or SHAMWARI address | Yes |
timestamp | int | Filter blocks newer than timestamp | Optional |
firstIndex | int | Pagination start index | Optional |
lastIndex | int | Pagination end index | Optional |
includeTransactions | boolean | Include transaction details in blocks | Optional |
Response
{
"blocks": [
{
"block": "1234567890",
"height": 250,
"timestamp": 123456789,
"generator": "1234567890",
"generatorRS": "SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"numberOfTransactions": 5,
"blockSignature": "abc123..."
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
block | string | Block ID |
height | int | Block height |
timestamp | int | Block timestamp |
generator | string | Generator account ID |
generatorRS | string | Generator's SHAMWARI address |
numberOfTransactions | int | Number of transactions in block |
blockSignature | string | Block signature (hex) |
Error Codes
| Code | Description |
|---|---|
| 3 | Unknown account |
Example
curl "http://localhost:22024/nxt?requestType=get-account-blocks&account=SHAMWARI-ABCD-EFGH-IJKL-MNOPQ"