getbalance
getbalance ( "dummy" minconf include_watchonly avoid_reuse )
Returns the total available balance.
The available balance represents the amount that the wallet considers spendable and can be affected by options that limit spendability, such as -spendzeroconfchange
.
Argument #1 – dummy
Type: string, optional
Retained for backward compatibility. Must be excluded or set to "*"
.
Argument #2 – minconf
Type: numeric, optional, default=0
Only include transactions that have been confirmed at least this many times.
Argument #3 – include_watchonly
Type: boolean, optional, default=true for watch-only wallets, otherwise false
Include the balance from watch-only addresses (see importaddress
).
Argument #4 – avoid_reuse
Type: boolean, optional, default=true
(Available only if the avoid_reuse
wallet flag is set) Exclude the balance from dirty outputs. Addresses are considered dirty if they have been used in a previous transaction.
Result
Name |
Type |
Description |
---|---|---|
n |
numeric |
The total amount in BTCE received for this wallet. |
Examples
The total amount in the wallet with 0 or more confirmations:
The total amount in the wallet with at least 6 confirmations:
As a JSON-RPC call: