<p>I would highly recommend that you not use the accounts system as it is deprecated and has been removed for Bitcoin Core 0.17 and beyond. Furthermore, the way that you want to use the accounts system is not how it actually works. Accounts are only associated with addresses for receiving; for spending, when you "send from" an account, all that happens is the numbers for the account are deducted, not that addresses that were associated with the account for receiving are the ones actually used in the inputs.</p>

<p>To send everything from an account, just use the <code>sendfrom</code> command with the balance of the account. This will change the accounting entries so that that account is deducted however much you sent. Note that this will not necessarily choose the inputs that you think are associated with the account; it can choose any input in the wallet to create the transaction. However if you call <code>getbalance &lt;account&gt;</code>, you will see the account's balance be 0.</p>

CC BY-SA 4.0
2018-06-06T16:27:17.023Z
Are you sure this works?  Where do transaction fees come from in this case?  `sendfrom` doesn't have the `subtractfeefromamount` parameter like `sendtoaddress`.  Do they come from another account, or what?
Nate Eldredge
CC BY-SA 4.0
2018-06-06T05:41:02.020Z
2018-06-06T05:41:02.020Z
Ava Chow
<p>I have create an account in bitcoind, which has got some balance of 1.77 btc, I would like to send everything to another address that is an admin address, so is there any rpc method to send everything or need to do  transaction fee calculation for this.  If transaction fee calculation has to be done, please let me know the calcuation, this particualar func has to be impl in my backend for a platform.</p>

CC BY-SA 4.0
2018-06-05T04:57:36.453Z
Do you want to send everything in the *account*, or everything in the *wallet*?  Accounts are deprecated and there may not be good support for doing anything related to them.
Nate Eldredge
CC BY-SA 4.0
2018-06-05T05:33:54.760Z
I want to send everything in an account.
Thomson Ignesious
<bitcoin-core-accounts>
How to send everything in a bitcoind account?
Thomson Ignesious
# How to send everything in a bitcoind account?

(Asked by: username_0 on 2018-06-05)

I have create an account in bitcoind, which has got some balance of 1.77 btc, I would like to send everything to another address that is an admin address, so is there any rpc method to send everything or need to do transaction fee calculation for this. If transaction fee calculation has to be done, please let me know the calcuation, this particualar func has to be impl in my backend for a platform.

**Tags:** bitcoin-core-accounts

> **Comments:**
> **username_1**: Do you want to send everything in the *account*, or everything in the *wallet*?  Accounts are deprecated and there may not be good support for doing anything related to them.  
> **username_0**: I want to send everything in an account.  

---

## 1 answers

### Answer by username_2 on 2018-06-06. Score: 1

I would highly recommend that you not use the accounts system as it is deprecated and has been removed for Bitcoin Core 0.17 and beyond. Furthermore, the way that you want to use the accounts system is not how it actually works. Accounts are only associated with addresses for receiving; for spending, when you "send from" an account, all that happens is the numbers for the account are deducted, not that addresses that were associated with the account for receiving are the ones actually used in the inputs.

To send everything from an account, just use the `sendfrom` command with the balance of the account. This will change the accounting entries so that that account is deducted however much you sent. Note that this will not necessarily choose the inputs that you think are associated with the account; it can choose any input in the wallet to create the transaction. However if you call `getbalance` , you will see the account's balance be 0.

> **Comments:**
> **username_1**: Are you sure this works?  Where do transaction fees come from in this case?  `sendfrom` doesn't have the `subtractfeefromamount` parameter like `sendtoaddress`.  Do they come from another account, or what?  

---

