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
| Parameter | Type | Required | Description |
|---|---|---|---|
requestType | String | Yes | Must be set to getAccountTotems. |
account | long/String | Yes | Target Account ID or Reed-Solomon address (SHAMWARI-...). |
totem | long | No | Optional single Totem ID filter. |
height | int | No | Historical block height query. Default: current block height. |
includeTotemInfo | boolean | No | If 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 Code | Cause / Description |
|---|---|
UNKNOWN_ACCOUNT | The specified account parameter is invalid or has no transaction history on-chain. |