GetAccountLedger
Returns ledger entries for a specific account, optionally filtered by event type, event, holding type, or holding.
Request
GET /nxt?requestType=get-account-ledger
All endpoints use port 22024 by default.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
account | string | Account ID or SHAMWARI address | Yes |
firstIndex | int | Pagination start index | Optional |
lastIndex | int | Pagination end index | Optional |
eventType | int | Filter by event type | Optional |
event | string | Filter by event | Optional |
holdingType | int | Filter by holding type | Optional |
holding | string | Filter by holding ID | Optional |
includeTransactions | boolean | Include transaction details | Optional |
includeHoldingInfo | boolean | Include holding metadata | Optional |
Response
{
"ledgerEntries": [
{
"ledgerId": "1234567890",
"account": "1234567890",
"accountRS": "SHAMWARI-ABCD-EFGH-IJKL-MNOPQ",
"eventType": 1,
"event": "transaction",
"holdingType": 0,
"holding": "987654321",
"changeQNT": "500000000",
"height": 250
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
ledgerId | string | Ledger entry ID |
account | string | Account ID |
accountRS | string | Account Reed-Solomon address in SHAMWARI format |
eventType | int | Event type |
event | string | Event identifier |
holdingType | int | Holding type |
holding | string | Holding ID |
changeQNT | string | Change in holding amount |
height | int | Block height |
Error Codes
| Code | Description |
|---|---|
| 3 | Unknown account |
Example
curl "http://localhost:22024/nxt?requestType=get-account-ledger&account=SHAMWARI-ABCD-EFGH-IJKL-MNOPQ"