<p><strong><em>NOTE</strong>: Account features are deprecated and will be removed in Bitcoin Core <code>v0.18.0</code>, it is recommended to switch to the <code>label</code> API in <code>v0.17.0</code> and later, see <a href="https://github.com/bitcoin/bitcoin/blob/07033a8f91975028e366920b0da3f7e2a6ef9cbd/doc/release-notes-14023.md" rel="nofollow noreferrer">Release notes 14023</a>.</em></p>

<p>Depending on what you are trying to do, you can either <em>move</em> them using the <a href="https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/move/" rel="nofollow noreferrer">move RPC</a>:</p>

<pre><code>move "fromaccount" "toaccount" amount ( minconf "comment" )

DEPRECATED. Move a specified amount from one account in your wallet to another.

Arguments:
1. "fromaccount"   (string, required) The name of the account to move funds from. May be the default account using "".
2. "toaccount"     (string, required) The name of the account to move funds to. May be the default account using "".
3. amount            (numeric) Quantity of BTC to move between accounts.
4. (dummy)           (numeric, optional) Ignored. Remains for backward compatibility.
5. "comment"       (string, optional) An optional comment, stored in the wallet only.

Result: true|false           (boolean) true if successful.

Examples:

Move 0.01 BTC from the default account to the account named tabby
&gt; bitcoin-cli move "" "tabby" 0.01

Move 0.01 BTC timotei to akiko with a comment and funds have 6 confirmations
&gt; bitcoin-cli move "timotei" "akiko" 0.01 6 "happy birthday!"

As a json rpc call
&gt; curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko",
0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
</code></pre>

<p>Or you can get the address of the default account using the <a href="https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/getaccountaddress/" rel="nofollow noreferrer">getaccountaddress</a> RPC:</p>

<p><code>$ bitcoin-cli getaccountaddress ""</code></p>

<p>and then send it to that address using the <a href="https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/sendfrom/" rel="nofollow noreferrer">sendfrom</a> RPC:</p>

<p><code>$ bitcoin-cli sendfrom &lt;account-name&gt; &lt;to-address&gt; &lt;amount&gt;</code></p>

CC BY-SA 4.0
2018-09-29T12:43:05.230Z
This command will allow only one to one tx... I am looking for many to one tx.
Madhu Crypto
CC BY-SA 4.0
2018-09-29T13:47:40.823Z
You can create it manually and use the `sendrawtransaction` rpc. I think if you use `sendtoaddress` and send the full amount, it will pull from multiple accounts, but the accounts feature doesn't work like you expect and the Bitcoin won't update the account balance.
JBaczuk
CC BY-SA 4.0
2018-09-29T14:04:42.183Z
JBaczuk, what is the best method you suggest to send small amounts from multiple addresses to default one address (account name - "")? _All addresses in the same wallet_
Madhu Crypto
CC BY-SA 4.0
2018-09-29T14:17:30.393Z
Honestly I would avoid the accounts features, they are confusing. You will move the funds to the address associated with the default account ("") and it won't reflect that when you `listaccounts` even though it has been sent to that address. Sorry I don't really have a good suggestion for using the Bitcoin Core wallet, but there are many other wallet implementations that would probably be better for this.
JBaczuk
CC BY-SA 4.0
2018-09-29T04:44:18.237Z
2018-09-29T04:44:18.237Z
JBaczuk
<p>I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as &quot;&quot;). Is there any RPC command available for this scenario?</p>

<bitcoin-core><bitcoind><json-rpc><bitcoin-cli>
RPC Command to send from multiple accounts to one account (default - "") in same wallet
Madhu Crypto
# RPC Command to send from multiple accounts to one account (default - "") in same wallet

(Asked by: username_0 on 2018-09-29)

I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as ""). Is there any RPC command available for this scenario?

**Tags:** bitcoin-core, bitcoind, json-rpc, bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2018-09-29. Score: 1

***NOTE***: Account features are deprecated and will be removed in Bitcoin Core `v0.18.0`, it is recommended to switch to the `label` API in `v0.17.0` and later, see [Release notes 14023](https://github.com/bitcoin/bitcoin/blob/07033a8f91975028e366920b0da3f7e2a6ef9cbd/doc/release-notes-14023.md).

Depending on what you are trying to do, you can either *move* them using the [move RPC](https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/move/):

```
move "fromaccount" "toaccount" amount ( minconf "comment" )

DEPRECATED. Move a specified amount from one account in your wallet to another.

Arguments:
1. "fromaccount"   (string, required) The name of the account to move funds from. May be the default account using "".
2. "toaccount"     (string, required) The name of the account to move funds to. May be the default account using "".
3. amount            (numeric) Quantity of BTC to move between accounts.
4. (dummy)           (numeric, optional) Ignored. Remains for backward compatibility.
5. "comment"       (string, optional) An optional comment, stored in the wallet only.

Result: true|false           (boolean) true if successful.

Examples:

Move 0.01 BTC from the default account to the account named tabby
> bitcoin-cli move "" "tabby" 0.01

Move 0.01 BTC timotei to akiko with a comment and funds have 6 confirmations
> bitcoin-cli move "timotei" "akiko" 0.01 6 "happy birthday!"

As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko",
0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

```

Or you can get the address of the default account using the [getaccountaddress](https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/getaccountaddress/) RPC:

`$ bitcoin-cli getaccountaddress ""`

and then send it to that address using the [sendfrom](https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/sendfrom/) RPC:

`$ bitcoin-cli sendfrom <account-name> <to-address> <amount>`

> **Comments:**
> **username_0**: This command will allow only one to one tx... I am looking for many to one tx.  
> **username_1**: You can create it manually and use the `sendrawtransaction` rpc. I think if you use `sendtoaddress` and send the full amount, it will pull from multiple accounts, but the accounts feature doesn't work like you expect and the Bitcoin won't update the account balance.  
> **username_0**: username_1, what is the best method you suggest to send small amounts from multiple addresses to default one address (account name - "")? _All addresses in the same wallet_  
> **username_1**: Honestly I would avoid the accounts features, they are confusing. You will move the funds to the address associated with the default account ("") and it won't reflect that when you `listaccounts` even though it has been sent to that address. Sorry I don't really have a good suggestion for using the Bitcoin Core wallet, but there are many other wallet implementations that would probably be better for this.  

---

