Class GetAccountLedger

The GetAccountLedger API will return entries from the account ledger. The
account ledger tracks all account changes as determined by the nxt.ledgerAccounts,
nxt.ledgerLogUnconfirmed and nxt.ledgerTrimKeep properties.

Request parameters

Name

Description

account

Account identifier or Reed-Solomon identifier
This is an optional parameter and restricts the search to entries matching the account identifier.

adminPassword

Administrator password.
The administrator password is required if more than nxt.maxAPIRecords entries are to be searched.

event

Event identifier.
The event identifier is ignored unless 'eventType' is also specified.
This is an optional parameter and restricts the search to entries matching both 'eventType'
and 'event'. Note that the asset identifier, currency identifier or digital goods identifier
is the same as the transaction identifier of the creating transaction.

eventType

Event type.
This is an optional parameter and restricts the search to entries matching 'eventType'.

holding

Holding identifier.
The holding identifier is ignored unless 'holdingType' is also specified.
This is an optional parameter and restricts the search to entries matching both 'holdingType'
and 'holding'.

holdingType

Holding type.
This is an optional parameter and restricts the search to entries matching 'holdingType'.

includeTransactions

Specify TRUE to include the transaction associated with a ledger entry. The default is FALSE.

includeHoldingInfo

Specify TRUE to include the corresponding asset or currency info (name, decimals) with each ledger entry. The default is FALSE.

The index of the last matching entry to return, inclusive.
The maximum number of entries returned is limited by the nxt.maxAPIRecords property
unless the administrator password is specified.

Ledger entry fields

Name

Description

account

Account identifier.

accountRS

Account Reed-Solomon identifier.

balance

Update balance for the holding identified by 'holdingType'.

block

Block that created the ledger entry. The current ledger entry will be removed if the block is
removed from the blockchain. A new ledger entry will be created when either the block is
added to the blockchain again or the transaction is included in a different block.

TRUE if the event is associated with a transaction and FALSE if it is associated with a block.

ledgerId

The ledger entry identifier. This is a counter that is incremented each time
a new entry is added to the account ledger. The ledger entry identifier is unique
to the peer returning the ledger entry and will be different for each peer in the
network. A new ledger entry identifier will be assigned if a ledger entry is removed
and then added again.

timestamp

The block timestamp associated with the event.

transaction

Transaction associated with the event if 'includeTransactions' is TRUE.

Values returned for 'holdingType'

Name

Description

ASSET_BALANCE

Change in the asset balance. The asset identifier is the 'holding'.

CURRENCY_BALANCE

Change in the currency balance. The currency identifier is the 'holding'.

COIN_BALANCE

Change in the coin balance for the account. The chain identifier is the 'holding'.

UNCONFIRMED_ASSET_BALANCE

Change in the unconfirmed asset balance. The asset identifier is the 'holding'.

UNCONFIRMED_CURRENCY_BALANCE

Change in the unconfirmed currency balance. The currency identifier is the 'holding'.

UNCONFIRMED_COIN_BALANCE

Change in the unconfirmed coin balance for the account. The chain identifier is the 'holding'.