nxt.http

## Class GetAccountLedgerEntry

- java.lang.Object
- - nxt.http.APIServlet.APIRequestHandler
  - - nxt.http.GetAccountLedgerEntry

-     public class GetAccountLedgerEntry
      extends APIServlet.APIRequestHandler

  The GetAccountLedgerEntry API will return an entry 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
  --- | ---
  ledgerId | The ledger entry identifier. This is a required parameter.
  includeTransaction | Specify TRUE to include the transaction associated with the 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.

  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.
  change | Change in the balance for the holding identified by 'holdingType'.
  event | The block or transaction associated with the event.
  eventType | Event causing the account change.
  height | The block height associated with the event.
  holding | The item identifier for an asset or currency balance.
  holdingType | The item being changed (account balance, asset balance or currency balance).
  isTransactionEvent | 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 'includeTransaction' 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'.
  NXT_BALANCE | Change in the NXT balance for the account. There is no '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_NXT_BALANCE | Change in the unconfirmed NXT balance for the account. There is no 'holding'.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allowRequiredBlockParameters()` No required block parameters
    `protected org.json.simple.JSONStreamAware` | `processRequest(javax.servlet.http.HttpServletRequest req)` Process the GetAccountLedgerEntry API request

    - ### Methods inherited from class nxt.http.APIServlet.APIRequestHandler

      `getAPITags, getFileParameter, getParameters, isPassword, isTextArea, processRequest, requireBlockchain, requireFullClient, requirePassword, requirePost, startDbTransaction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### processRequest

          protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
                                                            throws NxtException

      Process the GetAccountLedgerEntry API request
      Specified by:
        `processRequest` in class `APIServlet.APIRequestHandler`
      Parameters:
        `req` - API request
      Returns:
        API response
      Throws:
        `NxtException` - Invalid request

    - #### allowRequiredBlockParameters

          protected boolean allowRequiredBlockParameters()

      No required block parameters
      Overrides:
        `allowRequiredBlockParameters` in class `APIServlet.APIRequestHandler`
      Returns:
        FALSE to disable the required block parameters