How to find bitcoin balance via command line

2

I'm wondering how to find the balance a wallet for a full node on a command-line only linux box. bitcoin-cli doesn't seem to help here, and I'm not sure what else to try.

erikvold

Posted 2016-04-05T03:35:53.783

Reputation: 683

Answers

2

There is a simple RPC call getbalance. So bitcoin-cli getbalance should give you the number.

Pieter Wuille

Posted 2016-04-05T03:35:53.783

Reputation: 54 032

When I try bitcoin-cli getbalance I get error: {"code":-32601,"message":"Method not found"}erikvold 2016-04-05T21:36:08.090

1That means your bitcoind is compiled without wallet support.Pieter Wuille 2016-04-05T22:40:38.200

how about how to get balance of another public address?Aryeh Armon 2018-10-28T11:56:51.183

Bitcoin Core has no support for querying the balance of an address individually. You can add the addresses you care about to a wallet using importaddress or importmulti, and then query the wallet's balance after rescanning.Pieter Wuille 2018-10-28T16:46:17.083