getbalance

Back to wallet

Wallet

Summary

Returns the total available balance.

Description

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 (STR): Remains for backward compatibility. Must be excluded or set to "*".
  • minconf (NUM): Only include transactions confirmed at least this many times.
  • include_watchonly (BOOL): No longer used
  • avoid_reuse (BOOL): (only available if avoid_reuse wallet flag is set) Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction.

Results

  • amount (STR_AMOUNT): The total amount in QBT received for this wallet.

Examples

The total amount in the wallet with 0 or more confirmations
qbit-cli getbalance
The total amount in the wallet with at least 6 confirmations
qbit-cli getbalance "*" 6
As a JSON-RPC call
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getbalance", "params": ["*", 6]}' -H 'content-type: application/json' http://127.0.0.1:8352/