Skip to main content

API Reference: getAccountTotems

Retrieves current or historical Totem holdings for a given account across the network state.


Endpoint Details

  • HTTP Method: POST
  • Gateway Path: /nxt
  • Content-Type: application/x-www-form-urlencoded
  • API Tags: ACCOUNTS, AE
  • Chain Specific: No (Global account state query)

Request Parameters

ParameterTypeRequiredDescription
requestTypeStringYesMust be set to getAccountTotems.
accountlong/StringYesTarget Account ID or Reed-Solomon address (SHAMWARI-...).
totemlongNoOptional single Totem ID filter.
heightintNoHistorical block height query. Default: current block height.
includeTotemInfobooleanNoIf true, returns full embedded Totem asset details.

Example Request

curl -X POST http://localhost:22024/nxt \
-d "requestType=getAccountTotems" \
-d "account=SHAMWARI-ABCD-EFGH-JKLM-NOPQR" \
-d "includeTotemInfo=true"

Successful Response

{
"accountTotems": [
{
"account": "1234567890123456789",
"totem": "9876543210123456789",
"quantityQNT": "500000000",
"unconfirmedQuantityQNT": "500000000",
"totemInfo": {
"name": "HarareRealEstateFund",
"decimals": 4,
"type": 4,
"quantityQNT": "1000000000000"
}
}
]
}

Error Codes

Error CodeCause / Description
UNKNOWN_ACCOUNTThe specified account parameter is invalid or has no transaction history on-chain.