Account Balance (HD Wallet)
API-v2account_balance
The account_balance
method fetches a paginated snapshot of addresses generated from a specific HD-wallet account
(for a coin that was previously activated with HD-wallet derivation method) and the balance of each address.
It is the low-level (non-task-managed) variant of the task::account_balance::*
family.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
coin | string | ✓ | – | Coin ticker (e.g., BTC , ETH , KMD ). |
account_index | number | ✓ | – | BIP-44 account number to inspect (usually 0 ). |
chain | string | ✓ | – | BIP-44 chain: External (receiving) or Internal (change). |
limit | number | ✗ | 10 | Maximum number of addresses to return per page. |
paging_options | object | ✗ | – | Either { "from_id": <address_id> } or { "page_number": <n> } . If omitted, the first page (page_number = 1 ) is returned. |
Parameter | Type | Description |
---|---|---|
account_index | number | Account number that was queried. |
derivation_path | string | Root derivation path of the account (e.g., m/44'/0'/0' ). |
addresses | list | A list of objects containing each derived address and its balance. |
page_balance | object | Combined balance of all addresses in the current page. |
limit | number | Page size that was applied. |
skipped | number | Number of addresses skipped before the first item in addresses . |
total | number | Total number of known addresses for the account/chain. |
total_pages | number | Total number of pages based on total and limit . |
paging_options | object | Echoes the effective paging options that were used to generate this page. |
Each element of the addresses
list has the following structure:
Parameter | Type | Description |
---|---|---|
id | number | Sequential index of the derived address |
address | string | Bech32 / base58 / hex address string |
balance | string | Spendable balance for the address |
Account Balance
POST
account_balance{
"mmrpc": "2.0",
"userpass": "RPC_UserP@SSW0RD",
"method": "account_balance",
"params": {
"coin": "BTC",
"account_index": 0,
"chain": "External",
"limit": 5,
"paging_options": {
"page_number": 1
}
},
"id": 0
}
Parameter | Type | Description |
---|---|---|
NoSuchCoin | string | Coin is not activated. |
CoinIsActivatedNotWithHDWallet | string | Coin was enabled without HD-wallet derivation method. |
UnknownAccount | string | account_index does not exist. |
InvalidBip44Chain | string | Unsupported chain value. |
AddressLimitReached | GapLimit... | string | Address-generation limits reached (see error message for exact cause). |
Transport | Internal | Timeout | string | Other runtime errors. |