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 their any RPC command available for this scenario?

Thanks in advance


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.

Depending on what you are trying to do, you can either move them using the move RPC:

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

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

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.


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;'

Or you can get the address of the default account using the getaccountaddress RPC:

$ bitcoin-cli getaccountaddress ""

and then send it to that address using the sendfrom RPC:

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

  • This command will allow only one to one tx... I am looking for many to one tx. – Madhu Crypto Sep 29 '18 at 12:43
  • 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 Sep 29 '18 at 13:47
  • 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 Sep 29 '18 at 14:04
  • 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 Sep 29 '18 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.