Computes the wallet's balance broken down by category.

Synopsis

Declared in <wallet/receive.h>

Balance
GetBalance(
    CWallet const& wallet,
    int min_depth = 0,
    bool avoid_reuse = true,
    bool include_nonmempool = false);

Return Value

The computed balance breakdown.

Parameters

Name

Description

wallet

The wallet to evaluate.

min_depth

Minimum confirmation depth for coins to count as trusted.

avoid_reuse

Whether to account for the avoid‐reuse flag.

include_nonmempool

Whether to include coins spent by transactions not in the mempool.

Created with MrDocs