<p>If you go through the <a href="https://bitcoin.org/en/developer-reference#getbalance" rel="nofollow noreferrer">documentation</a>, the <code>getbalance</code> command can take arguments for an account name, but not an address. I see that you are trying to get the balance for an address. </p>

<p>On blockchain, each account will be linked to non-zero number of addresses. Money sent to any of these addresses will be shown on the same account. So it doesn't make sense in showing the balance on an address. You command was interpreted as getting the balance on the account <code>mviKj9i2zQmoLVUGkLBMuDhwvAwDmfrAmZ</code>, which is non-existent. Hence, the result of <code>0.00000000</code>.</p>

CC BY-SA 3.0
2017-02-24T08:06:02.230Z
2017-02-24T08:06:02.230Z
Kalyan Kumar
<p>I'm not quite sure what I'm doing wrong here. I believe I have followed everything correctly but for some reason its still not working? I am using directions from here: <a href="https://bitcoin.org/en/developer-examples" rel="nofollow noreferrer">https://bitcoin.org/en/developer-examples</a></p>

<p>bitcoin-cli -regtest generate 101 &lt; This prints that long list of new satoshis</p>

<p>bitcoin-cli -regtest getbalance </p>

<p>50.00000000
Ensuring that the balance is 50</p>

<p>bitcoin-cli -regtest getnewaddress &lt; Make sure I have a new address to send satoshis to</p>

<p>bitcoin-cli -regtest sendtoaddress mviKj9i2zQmoLVUGkLBMuDhwvAwDmfrAmZ 10.00
Attempting to send satoshis. This returns the transaction ID.</p>

<p>bitcoin-cli -regtest generate 1 &lt; Should confirm it</p>

<p>bitcoin-cli -regtest getbalance mviKj9i2zQmoLVUGkLBMuDhwvAwDmfrAmZ</p>

<p>I am expecting this to return 10.00 however it returns 0.00000000</p>

<p>Any ideas on how to fix this?</p>

CC BY-SA 3.0
2016-11-29T19:25:35.080Z
You're passing an argument to `getbalance`, which is interpreted as an account name (a feature that is deprecated and will be removed soon). If you drop that, you'll get the wallet balance. Alternatively, you could use `getreceivedbyaddress`.
Pieter Wuille
<bitcoind><sending><regtest>
After bitcoin-cli -regtest -sendtoaddress "address" That address's balance is always 0
Benjamin Creem
# After bitcoin-cli -regtest -sendtoaddress "address" That address's balance is always 0

(Asked by: username_0 on 2016-11-29)

I'm not quite sure what I'm doing wrong here. I believe I have followed everything correctly but for some reason its still not working? I am using directions from here: <https://bitcoin.org/en/developer-examples>

bitcoin-cli -regtest generate 101 < This prints that long list of new satoshis

bitcoin-cli -regtest getbalance

50.00000000
Ensuring that the balance is 50

bitcoin-cli -regtest getnewaddress < Make sure I have a new address to send satoshis to

bitcoin-cli -regtest sendtoaddress mviKj9i2zQmoLVUGkLBMuDhwvAwDmfrAmZ 10.00
Attempting to send satoshis. This returns the transaction ID.

bitcoin-cli -regtest generate 1 < Should confirm it

bitcoin-cli -regtest getbalance mviKj9i2zQmoLVUGkLBMuDhwvAwDmfrAmZ

I am expecting this to return 10.00 however it returns 0.00000000

Any ideas on how to fix this?

**Tags:** bitcoind, sending, regtest

> **Comments:**
> **username_1**: You're passing an argument to `getbalance`, which is interpreted as an account name (a feature that is deprecated and will be removed soon). If you drop that, you'll get the wallet balance. Alternatively, you could use `getreceivedbyaddress`.  

---

## 1 answers

### Answer by username_2 on 2017-02-24. Score: 3 | Accepted answer

If you go through the [documentation](https://bitcoin.org/en/developer-reference#getbalance), the `getbalance` command can take arguments for an account name, but not an address. I see that you are trying to get the balance for an address.

On blockchain, each account will be linked to non-zero number of addresses. Money sent to any of these addresses will be shown on the same account. So it doesn't make sense in showing the balance on an address. You command was interpreted as getting the balance on the account `mviKj9i2zQmoLVUGkLBMuDhwvAwDmfrAmZ`, which is non-existent. Hence, the result of `0.00000000`.


---

