<p>A very generic question, so only a generic answer. I think, what you are looking for is how to create a transaction with multiple inputs, to a single output. There are many bitcoin tools out there, I for myself use some shell scripts on unixoide systems. There is also bx and tx tools, as described in Andreas‘ book „Mastering Bitcoin“ (book is online readable). Then there are libraries for php, Java, python - each with its own learning curve. Generally: you need the previous tx ID, the outpoint, and the target address and amount. This all needs to go into a serialized set of data, then a hash is generated over it, and signed. Once you have the signed tx, you can send it from a wallet or from many Online services (like blockchain.info) to the network. </p>

<p>I recommend to start playing on testnet or regtest, assemble a tx, and run through the possibilities. Then you can search specifically here in the forum, or raise a question based on the experience. 
Again: it can be done manually, but requires some effort to get into the logic of correct assembly. Andreas‘ book is a good starting point.</p>

CC BY-SA 3.0
2018-02-14T18:58:22.503Z
2018-02-14T19:51:19.117Z
2018-02-14T19:51:19.117Z
pebwindkraft
<p>I have 3 btc addresses and let's say each btc address has 1 bitcoin. If I want to transfer to my address from 3 btc addresses, I have to create 3 transactions and every time I have to pay a mining fee. Instead of that Can I transfer all the amount from 3 btc addresses to my btc address in a single transaction? How to manually create a transaction? I am using "pybitcointools" library. But It supports only to send coins to multiple addresses. Could anyone help me out in creating a single transaction manually using any library?</p>

<transactions><raw-transaction><createrawtransaction>
How to transfer btc from multiple btc addresses to a single btc address?
merklexy
# How to transfer btc from multiple btc addresses to a single btc address?

(Asked by: username_0 on 2018-02-14)

I have 3 btc addresses and let's say each btc address has 1 bitcoin. If I want to transfer to my address from 3 btc addresses, I have to create 3 transactions and every time I have to pay a mining fee. Instead of that Can I transfer all the amount from 3 btc addresses to my btc address in a single transaction? How to manually create a transaction? I am using "pybitcointools" library. But It supports only to send coins to multiple addresses. Could anyone help me out in creating a single transaction manually using any library?

**Tags:** transactions, raw-transaction, createrawtransaction


---

## 1 answers

### Answer by username_1 on 2018-02-14. Score: 1 | Accepted answer

A very generic question, so only a generic answer. I think, what you are looking for is how to create a transaction with multiple inputs, to a single output. There are many bitcoin tools out there, I for myself use some shell scripts on unixoide systems. There is also bx and tx tools, as described in Andreas‘ book „Mastering Bitcoin“ (book is online readable). Then there are libraries for php, Java, python - each with its own learning curve. Generally: you need the previous tx ID, the outpoint, and the target address and amount. This all needs to go into a serialized set of data, then a hash is generated over it, and signed. Once you have the signed tx, you can send it from a wallet or from many Online services (like blockchain.info) to the network.

I recommend to start playing on testnet or regtest, assemble a tx, and run through the possibilities. Then you can search specifically here in the forum, or raise a question based on the experience.
Again: it can be done manually, but requires some effort to get into the logic of correct assembly. Andreas‘ book is a good starting point.


---

