Skip to main content

getbalance

Overview

The 'getbalance' Returns the total available balance.

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":"getbalance","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • dummy: Remains for backward compatibility. Must be excluded or set to “*”.
  • minconf: Only include transactions confirmed at least this many times.
  • include_watchonly: Also include balance in watch-only addresses (see ‘importaddress’)
  • avoid_reuse: (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.

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
}