getaddressbalance
Command#
pacprotocol-cli getaddressbalance
Returns the balance for an address(es) (requires addressindex to be enabled).
Arguments#
{
"addresses"
[
"address" (string) The base58check encoded address
,...
]
}
Examples#
pacprotocol-cli getaddressbalance '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressbalance", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/
Result#
{
"balance": xxxxx, #(numeric) The current total balance in duffs
"balance_immature": xxxxx, #(numeric) The current immature balance in duffs
"balance_spendable": xxxxx, #(numeric) The current spendable balance in duffs
"received": xxxxx #(numeric) The total number of duffs received #(including change)
}
Running following help command
pacprotocol-cli help getaddressbalance
Will produce following output:
getaddressbalance
Returns the balance for an address(es) (requires addressindex to be enabled).
Arguments:
{
"addresses"
[
"address" (string) The base58check encoded address
,...
]
}
Result:
{
"balance": xxxxx, (numeric) The current total balance in duffs
"balance_immature": xxxxx, (numeric) The current immature balance in duffs
"balance_spendable": xxxxx, (numeric) The current spendable balance in duffs
"received": xxxxx (numeric) The total number of duffs received (including change)
}
Examples:
> pacprotocol-cli getaddressbalance '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressbalance", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/