<p>Another way to transfer all funds from one wallet to another is to just import the private key into the wallet.
With your new wallet there will be an option to "import private key".
You can scan the qr code or cut and paste your private key and everything in that wallet will be transferred into the new one.
Make sure you choose the option to import into new address.</p>

CC BY-SA 3.0
2016-11-23T19:04:13.417Z
It makes little sense to import private keys into a BIP32 wallet. And the wallet I use (copay) doesn't seem to offer that option.
wereHamster
CC BY-SA 3.0
2016-11-23T13:40:41.133Z
2016-11-23T13:40:41.133Z
Mike White
<p>You can create a transaction having an output value equal to the entire balance of your bitcoin core wallet. The last parameter of sendtoaddress is a boolean signifying whether to include transaction fees or not, which you can set as true. The sendtoaddress API has a mechanism of generating a new address for the change remaining from the value you have given.</p>

<p>Another way would be to manually create the transaction with all the inputs from the addresses which have balance and sending it to the new wallet address. Remember to keep some difference in the input and output of the values which would be treated as transaction fees.</p>

<p>As for the last question, if your question is pertaining to the addresses in your old bitcoin core wallet, then you can use the <code>listaddressgroupings</code> API to get a detailed balance of each of the address your wallet has created. 
If the addresses don't belong to a core wallet, then you can simply search for the balance on <code>https://blockchain.info/address/&lt;your_address&gt;</code></p>

CC BY-SA 3.0
2016-11-23T19:05:12.093Z
If I manually create a transaction, is the whole difference between input and output treated as the transaction fees (automatically, by virtue of there being a difference)?
wereHamster
CC BY-SA 3.0
2016-11-23T19:41:13.257Z
Yes it is. If there is no difference, it would be treated like a no fee transaction, and since it involves a lot of inputs in your case, the transaction size would be larger(because it depends on the amount of bytes as a standard, you can search for it) and would not be mined. However 0.0001 BTC is an average which would get your transaction mined (as per my experience)
Shabahat M. Ayubi
CC BY-SA 3.0
2016-11-23T08:22:42.947Z
2016-11-23T08:22:42.947Z
Shabahat M. Ayubi
<p>Most wallets have a "Sweep" function that allows you to import private keys, transfer the balance to the new wallet, and then delete the private keys.</p>

CC BY-SA 3.0
2017-08-18T13:42:54.380Z
2017-08-18T13:42:54.380Z
Christoph Winter
<p>I have some bitcoins in an old bitcoin-core wallet and would like to transfer all of them to a new BIP32 wallet. I tried doing sendtoaddress with subtractfeefromamount=true, but bitcoin transferred all but 0.0005BTC to the new address (I suspect some rounding issue when calculating the fee and amount to send). So now I have an address with 0.0005BTC (plus some other addresses with a larger amount). How can I reliably transfer all funds so that all the addresses in the old wallet have zero balance?</p>

<p>Furthermore, is there a way to verify that all addresses for which I have the private key have a zero balance?</p>

<wallet>
How do I transfer all funds from one wallet to another?
wereHamster
# How do I transfer all funds from one wallet to another?

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

I have some bitcoins in an old bitcoin-core wallet and would like to transfer all of them to a new BIP32 wallet. I tried doing sendtoaddress with subtractfeefromamount=true, but bitcoin transferred all but 0.0005BTC to the new address (I suspect some rounding issue when calculating the fee and amount to send). So now I have an address with 0.0005BTC (plus some other addresses with a larger amount). How can I reliably transfer all funds so that all the addresses in the old wallet have zero balance?

Furthermore, is there a way to verify that all addresses for which I have the private key have a zero balance?

**Tags:** wallet


---

## 3 answers

### Answer by username_1 on 2016-11-23. Score: 2

Another way to transfer all funds from one wallet to another is to just import the private key into the wallet.
With your new wallet there will be an option to "import private key".
You can scan the qr code or cut and paste your private key and everything in that wallet will be transferred into the new one.
Make sure you choose the option to import into new address.

> **Comments:**
> **username_0**: It makes little sense to import private keys into a BIP32 wallet. And the wallet I use (copay) doesn't seem to offer that option.  

---

### Answer by username_2 on 2016-11-23. Score: 2

You can create a transaction having an output value equal to the entire balance of your bitcoin core wallet. The last parameter of sendtoaddress is a boolean signifying whether to include transaction fees or not, which you can set as true. The sendtoaddress API has a mechanism of generating a new address for the change remaining from the value you have given.

Another way would be to manually create the transaction with all the inputs from the addresses which have balance and sending it to the new wallet address. Remember to keep some difference in the input and output of the values which would be treated as transaction fees.

As for the last question, if your question is pertaining to the addresses in your old bitcoin core wallet, then you can use the `listaddressgroupings` API to get a detailed balance of each of the address your wallet has created.
If the addresses don't belong to a core wallet, then you can simply search for the balance on `https://blockchain.info/address/<your_address>`

> **Comments:**
> **username_0**: If I manually create a transaction, is the whole difference between input and output treated as the transaction fees (automatically, by virtue of there being a difference)?  
> **username_2**: Yes it is. If there is no difference, it would be treated like a no fee transaction, and since it involves a lot of inputs in your case, the transaction size would be larger(because it depends on the amount of bytes as a standard, you can search for it) and would not be mined. However 0.0001 BTC is an average which would get your transaction mined (as per my experience)  

---

### Answer by username_3 on 2017-08-18. Score: 1

Most wallets have a "Sweep" function that allows you to import private keys, transfer the balance to the new wallet, and then delete the private keys.


---

