Skip to main content

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

NameTypeDescriptionRequired
accountstringAccount ID or SHAMWARI addressYes
firstIndexintPagination start indexOptional
lastIndexintPagination end indexOptional
eventTypeintFilter by event typeOptional
eventstringFilter by eventOptional
holdingTypeintFilter by holding typeOptional
holdingstringFilter by holding IDOptional
includeTransactionsbooleanInclude transaction detailsOptional
includeHoldingInfobooleanInclude holding metadataOptional

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

FieldTypeDescription
ledgerIdstringLedger entry ID
accountstringAccount ID
accountRSstringAccount Reed-Solomon address in SHAMWARI format
eventTypeintEvent type
eventstringEvent identifier
holdingTypeintHolding type
holdingstringHolding ID
changeQNTstringChange in holding amount
heightintBlock height

Error Codes

CodeDescription
3Unknown account

Example

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