Contents

getBalanceDetailread-only#

Get detailed balance information for one currency.

Unlike getBalances, which reports one balance per scope, this operation aggregates the wallet’s funds in the given currency across all exchanges known to the wallet and reports how much of the balance is spendable under progressively stricter criteria.

Request:

The request args must be a GetBalanceDetailRequest object.

Response:

On success, the result is a PaymentBalanceDetails object.

Details:

balanceAvailable covers funds available for spending, including amounts expected from pending refreshes. balanceMaterial is the balance the wallet believes it could spend right now, without waiting for any operations to complete. The remaining balances are subsets of the material balance: balanceAgeAcceptable applies an age restriction (always zero for this operation), the balanceReceiver*Acceptable balances restrict to funds that a receiver accepts based on exchange URL, exchange public key or auditor URL, and the depositable balances additionally require that the funds can be deposited via a supported wire method. Coins signed by a master key that the exchange has since replaced (and not re-advertised) are excluded from all of these balances, as coin selection would never pick them; unlike in getBalances, they are not reported at all here.

interface GetBalanceDetailRequest {
  // Currency to compute the balance details for.
  currency: string;
}
interface PaymentBalanceDetails {
  // Balance of type "available" (see details above).
  balanceAvailable: AmountJson;

  // Balance of type "material" (see details above).
  balanceMaterial: AmountJson;

  // Balance of type "age-acceptable" (see details above).
  balanceAgeAcceptable: AmountJson;

  // Balance of type "receiver-acceptable" (see details above).
  // Deprecated, use the balanceReceiver*Acceptable balances instead.
  balanceReceiverAcceptable: AmountJson;

  // Balance of type "receiver-exchange-url-acceptable".
  balanceReceiverExchangeUrlAcceptable: AmountJson;

  // Balance of type "receiver-exchange-pub-acceptable".
  balanceReceiverExchangePubAcceptable: AmountJson;

  // Balance of type "receiver-auditor-url-acceptable".
  balanceReceiverAuditorUrlAcceptable: AmountJson;

  // Balance of type "receiver-depositable".
  balanceReceiverDepositable: AmountJson;

  // Balance that is depositable with the exchange, reduced by the
  // exchange's debit restrictions and wire fee configuration.
  balanceExchangeDepositable: AmountJson;

  // Estimated maximum amount that the wallet could pay for,
  // under the assumption that the merchant pays absolutely no fees.
  maxMerchantEffectiveDepositAmount: AmountJson;
}