<p>Because Bitcoin Core does not support "balance of address".</p>

<p>The wallet has a single balance, and addresses are treated as separate input gates into that balance, so you can distinguish what is being paid for (by allowing you to give a different address to each payer).</p>

<p>The argument to <code>getbalance</code> is an account name. Accounts are just bean counters: they don't correspond to actual coins in the network. You can change their balance using the <code>move</code> RPC command, which does not even create a transaction. They're a purely local abstraction. You can associate an address with an account so that receives on that address credit the account, and you can use the <code>sendfrom</code> RPC to deduct the sent funds from a given account (but the actual transaction outputs used are still drawn from a pool shared by the whole wallet).</p>

<p>Accounts are a confusing feature however, and they're hard to use in a correct way. That's why they're also scheduled for deprecation in Bitcoin Core.</p>

<p>Perhaps you're looking for the <code>getreceivedbyaddress</code> RPC?</p>

CC BY-SA 3.0
2015-11-29T01:37:06.420Z
Exactly. What I want is getreceiveaddress RPC.
Thanks a lot, Pieter:)
$ ./bitcoin-cli getreceivedbyaddress mknGW629wzSkfWvgXF23d8eTrqibnhTcrf
0.43938200
Toshi
CC BY-SA 3.0
2015-11-28T23:35:43.220Z
2015-11-28T23:35:43.220Z
Pieter Wuille
<p>When I called listunspent, it returned the following array. From the array, I thought the balance "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf" is 0.1097. However, when I called getbalance of mknGW629wzSkfWvgXF23d8eTrqibnhTcrf, it returned 0.000000.</p>

<p>Why sum of amounts of listunspnet is not equal with balance of address?</p>

<pre><code>$./bitcoin-cli listunspent

{
    "txid": "a82bf11b72d6ef2f5eaa62190914a4c80b8749e075015fda513b899f54d29e06",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 367,
    "spendable": true
  },
  {
    "txid": "b8f8d20946ca52283fbf192c7ebfb817deba260c54911938d59bb64bbb8cb8a7",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 366,
    "spendable": true
  },
  {
    "txid": "b8f8d20946ca52283fbf192c7ebfb817deba260c54911938d59bb64bbb8cb8a7",
    "vout": 2,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.10968200,
    "confirmations": 366,
    "spendable": true
  },
  {
    "txid": "b66513ae7aab964e5374d97be206b94e529055523a35d2249ad2917745c921f8",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 370,
    "spendable": true
  }
]

$ ./bitcoin-cli getbalance mknGW629wzSkfWvgXF23d8eTrqibnhTcrf
0.00000000
</code></pre>

<bitcoind><bitcoin-core>
Why the amount of listunspent and getbalance is not the same when each data is called by API?
Toshi
# Why the amount of listunspent and getbalance is not the same when each data is called by API?

(Asked by: username_0 on 2015-11-28)

When I called listunspent, it returned the following array. From the array, I thought the balance "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf" is 0.1097. However, when I called getbalance of mknGW629wzSkfWvgXF23d8eTrqibnhTcrf, it returned 0.000000.

Why sum of amounts of listunspnet is not equal with balance of address?

```
$./bitcoin-cli listunspent

{
    "txid": "a82bf11b72d6ef2f5eaa62190914a4c80b8749e075015fda513b899f54d29e06",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 367,
    "spendable": true
  },
  {
    "txid": "b8f8d20946ca52283fbf192c7ebfb817deba260c54911938d59bb64bbb8cb8a7",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 366,
    "spendable": true
  },
  {
    "txid": "b8f8d20946ca52283fbf192c7ebfb817deba260c54911938d59bb64bbb8cb8a7",
    "vout": 2,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.10968200,
    "confirmations": 366,
    "spendable": true
  },
  {
    "txid": "b66513ae7aab964e5374d97be206b94e529055523a35d2249ad2917745c921f8",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 370,
    "spendable": true
  }
]

$ ./bitcoin-cli getbalance mknGW629wzSkfWvgXF23d8eTrqibnhTcrf
0.00000000

```

**Tags:** bitcoind, bitcoin-core


---

## 1 answers

### Answer by username_1 on 2015-11-28. Score: 4 | Accepted answer

Because Bitcoin Core does not support "balance of address".

The wallet has a single balance, and addresses are treated as separate input gates into that balance, so you can distinguish what is being paid for (by allowing you to give a different address to each payer).

The argument to `getbalance` is an account name. Accounts are just bean counters: they don't correspond to actual coins in the network. You can change their balance using the `move` RPC command, which does not even create a transaction. They're a purely local abstraction. You can associate an address with an account so that receives on that address credit the account, and you can use the `sendfrom` RPC to deduct the sent funds from a given account (but the actual transaction outputs used are still drawn from a pool shared by the whole wallet).

Accounts are a confusing feature however, and they're hard to use in a correct way. That's why they're also scheduled for deprecation in Bitcoin Core.

Perhaps you're looking for the `getreceivedbyaddress` RPC?

> **Comments:**
> **username_0**: Exactly. What I want is getreceiveaddress RPC. Thanks a lot, username_1:) $ ./bitcoin-cli getreceivedbyaddress mknGW629wzSkfWvgXF23d8eTrqibnhTcrf 0.43938200  

---

