<h3>Problem</h3>

<blockquote>
  <p><em>rricci2009 commented:</em></p>
  
  <p>After few transaction by <code>sendtoaddress</code> command, balance in "" became negative. I solved with the "move" command from another account to "". [...]</p>
</blockquote>

<h3>Cause</h3>

<blockquote>
  <p><em>sipa commented:</em></p>
  
  <p>That is expected behavior, if your incoming transactions credit accounts other than "", but outgoing transactions debit account "" (the default if you're not using <code>sendfrom</code>), the "" account will go negative. [...]</p>
</blockquote>

<h3>Mitigation</h3>

<blockquote>
  <p><em>Tectract commented:</em></p>
  
  <p>[...] So, is there a way to do something like a <code>sendtoaddress</code> command that won't leave me with odd negative balances?</p>
  
  <p><em>gavinandresen commented:</em></p>
  
  <p>Use the <code>sendfrom</code> RPC command.</p>
  
  <p>And you can use the <code>move</code> RPC command to reset account balances to what you expect (and listaccounts to see all accounts / balances)</p>
</blockquote>

<p><a href="https://github.com/bitcoin/bitcoin/issues/2191" rel="nofollow">Source.</a></p>

CC BY-SA 3.0
2014-11-18T04:33:56.037Z
2014-12-13T02:49:30.963Z
2014-12-13T02:49:30.963Z
Nick ODell
<p>Through dogecoin-cli, I sent half the dogecoins I own to an external address. Now, when I call the listaccounts function, I get this:</p>

<pre><code>[root@web ~]# ./dogecoin-cli listaccounts
{
    "" : -25001.00000000,
    "doge" : 48136.85072100
}
</code></pre>

<p>Notice how the "" has -25001.00000000. I am using a query from php to get the balance of "doge" and display it to users. That returns 48136.85072100, which is a problem, because I only have 23135.85072100 doge. How can I fix this problem? Thanks!</p>

CC BY-SA 3.0
2014-11-18T04:28:46.403Z
This is a problem general to all Bitcoin-derivatives. Perhaps you should edit your question to make it more general.
Nick ODell
CC BY-SA 3.0
2014-11-18T23:38:58.380Z
If you have multiple accounts: use `sendfrom` to send from a specific account. If you don't care about the accounts, use `getbalance`
TheDoctor
<dogecoin><bitcoin-core-accounts>
Negative Dogecoin Balances?
Jordan
# Negative Dogecoin Balances?

(Asked by: username_0 on 2014-11-18)

Through dogecoin-cli, I sent half the dogecoins I own to an external address. Now, when I call the listaccounts function, I get this:

```
[root@web ~]# ./dogecoin-cli listaccounts
{
    "" : -25001.00000000,
    "doge" : 48136.85072100
}

```

Notice how the "" has -25001.00000000. I am using a query from php to get the balance of "doge" and display it to users. That returns 48136.85072100, which is a problem, because I only have 23135.85072100 doge. How can I fix this problem? Thanks!

**Tags:** dogecoin, bitcoin-core-accounts

> **Comments:**
> **username_1**: This is a problem general to all Bitcoin-derivatives. Perhaps you should edit your question to make it more general.  
> **username_2**: If you have multiple accounts: use `sendfrom` to send from a specific account. If you don't care about the accounts, use `getbalance`  

---

## 1 answers

### Answer by username_1 on 2014-11-18. Score: 2

### Problem

> *rricci2009 commented:*
>
> After few transaction by `sendtoaddress` command, balance in "" became negative. I solved with the "move" command from another account to "". [...]

### Cause

> *sipa commented:*
>
> That is expected behavior, if your incoming transactions credit accounts other than "", but outgoing transactions debit account "" (the default if you're not using `sendfrom`), the "" account will go negative. [...]

### Mitigation

> *Tectract commented:*
>
> [...] So, is there a way to do something like a `sendtoaddress` command that won't leave me with odd negative balances?
>
> *gavinandresen commented:*
>
> Use the `sendfrom` RPC command.
>
> And you can use the `move` RPC command to reset account balances to what you expect (and listaccounts to see all accounts / balances)

[Source.](https://github.com/bitcoin/bitcoin/issues/2191)


---

