Skip to main content

getbalance

Command#

pacprotocol-cli getbalance ( "(dummy)" minconf addlocked include_watchonly )

Returns the total available balance. The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.

Arguments#

(dummy)#

(string, optional)

Remains for backward compatibility. Must be excluded or set to "*".

minconf#

(numeric, optional, default=0)

Only include transactions confirmed at least this many times.

addlocked#

(bool, optional, default=false)

Whether to include the value of transactions locked via InstantSend in the wallet's balance.

include_watchonly#

( bool, optional, default=false)

Also include balance in watch-only addresses (see 'importaddress')

Examples#

The total amount in the wallet with 1 or more confirmations

pacprotocol-cli getbalance

The total amount in the wallet at least 6 blocks confirmed

pacprotocol-cli getbalance "*" 6

As a json rpc call

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Result#

amount #(numeric) The total amount in PAC received for this account.

Running following help command

pacprotocol-cli help getbalance

Will produce following output:

getbalance ( "(dummy)" minconf addlocked include_watchonly )
Returns the total available balance.
The available balance is what the wallet considers currently spendable, and is
thus affected by options which limit spendability such as -spendzeroconfchange.
Arguments:
1. (dummy) (string, optional) Remains for backward compatibility. Must be excluded or set to "*".
2. minconf (numeric, optional, default=0) Only include transactions confirmed at least this many times.
3. addlocked (bool, optional, default=false) Whether to include the value of transactions locked via InstantSend in the wallet's balance.
4. include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses (see 'importaddress')
Result:
amount (numeric) The total amount in PAC received for this account.
Examples:
The total amount in the wallet with 1 or more confirmations
> pacprotocol-cli getbalance
The total amount in the wallet at least 6 blocks confirmed
> pacprotocol-cli getbalance "*" 6
As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/