Skip to main content

getbalances

Overview

The 'getbalances' method returns an object with all balances in BTC. It provides detailed information about the balances available in your wallet, including trusted, untrusted pending, immature, and used balances.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 4303fb63-adec-42dc-b571-74bc2f2a5167' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"getbalances","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • trusted: Numeric value representing the trusted balance (outputs created by the wallet or confirmed outputs).
  • untrusted_pending: Numeric value representing the untrusted pending balance (outputs created by others that are in the mempool).
  • immature: Numeric value representing the balance from immature coinbase outputs.
  • used: Numeric value representing the balance from coins sent to addresses that were previously spent from (potentially privacy violating). This parameter is only present if avoid_reuse is set.

Response

{
"result": null,
"error": {
"code": -18,
"message": "Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)"
},
"id": 1
}