<p>Inputs are always spent completely! Any amount of the sum of inputs that your transaction doesn't spend, implicitly becomes available to the validating miner to assign as a transaction fee to an address of his choosing. </p>

<p>Most clients recognize change as coming from another address that you also control and thus allow you to immediately spend it. So, your money is not frozen due to being change in another transaction.</p>

CC BY-SA 3.0
2013-12-05T10:36:35.470Z
2013-12-05T21:58:00.010Z
2013-12-05T21:58:00.010Z
Murch
<p>The fee is the difference between the inputs and outputs, so you can specify the fee by leaving that amount unaccounted for in your transaction. </p>

<p>Be careful though, this has lead to 200BTC transaction fees in the past when someone forgot to include a change address: <a href="http://www.reddit.com/r/Bitcoin/comments/1lb5my/asicminer_refunds_the_accidental_200_btc/" rel="nofollow">http://www.reddit.com/r/Bitcoin/comments/1lb5my/asicminer_refunds_the_accidental_200_btc/</a></p>

CC BY-SA 3.0
2013-12-03T17:43:20.113Z
So is there a way to reduce the input?
jchysk
CC BY-SA 3.0
2013-12-03T18:28:12.780Z
no, see this for more information: http://bitcoin.stackexchange.com/questions/11411/in-getrawtransaction-what-is-the-vout-integer-in-the-vin-list
Scrybe
CC BY-SA 3.0
2013-12-03T20:22:02.583Z
I did a bad job with the title of the question for the true question I had. To the question: "Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?" It seems the answer is no. 

Since this is the answer the question in the title I'll mark it as the answer.
jchysk
CC BY-SA 3.0
2013-12-03T15:28:35.267Z
2013-12-03T15:28:35.267Z
Scrybe
<p>Question: Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?</p>

<p>I get some unspent bitcoins</p>

<pre><code>listunspent()
</code></pre>

<p>I grab the txid, vout, and scriptPubKey for each
Then I get the list of all the addresses and quantities that I want to send to</p>

<pre><code>createrawtransaction(source, destination)
</code></pre>

<p>Let's say my total unspent is 1.00000000 BTC, the total I want to send out to all the addresses is 0.50000000, and it'll be about a 3100 byte transfer that I need to pay 0.00040000 fees for.
The way I currently build the destination addresses is to place the address it's coming from (myself) as unspent - tx fees - outgoing, so that would be 0.49600000, the destinations would all be specified, and the fee remains unspecified but deduced by the remainder.</p>

<p>So, this is working for my purposes, but is a little inconvenient. The amount that I'm not sending to anyone sends back to myself and has to be reconfirmed so the funds aren't available until then.</p>

<p>If I had a single unspent address with 100 BTC and needed to send 1 BTC to 15 people, it doesn't seem to make sense to temporarily lock up 85 BTC in the process. If I were to use a client and manually send 1 BTC at a time, the unused funds would remain available, so I feel pretty confident what I'm asking for is possible.
Any assistance would be most appreciated.</p>

<p>NOTE: I'm using bitcoind now.</p>

<blockchain><bitcoind><transaction-fees><raw-transaction>
How can I specify transaction fee size when creating a raw transaction?
jchysk
# How can I specify transaction fee size when creating a raw transaction?

(Asked by: username_0 on 2013-12-03)

Question: Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?
I get some unspent bitcoins
listunspent()

I grab the txid, vout, and scriptPubKey for each
Then I get the list of all the addresses and quantities that I want to send to
createrawtransaction(source, destination)

Let's say my total unspent is 1.00000000 BTC, the total I want to send out to all the addresses is 0.50000000, and it'll be about a 3100 byte transfer that I need to pay 0.00040000 fees for.
The way I currently build the destination addresses is to place the address it's coming from (myself) as unspent - tx fees - outgoing, so that would be 0.49600000, the destinations would all be specified, and the fee remains unspecified but deduced by the remainder.
So, this is working for my purposes, but is a little inconvenient. The amount that I'm not sending to anyone sends back to myself and has to be reconfirmed so the funds aren't available until then.
If I had a single unspent address with 100 BTC and needed to send 1 BTC to 15 people, it doesn't seem to make sense to temporarily lock up 85 BTC in the process. If I were to use a client and manually send 1 BTC at a time, the unused funds would remain available, so I feel pretty confident what I'm asking for is possible.
Any assistance would be most appreciated.
NOTE: I'm using bitcoind now.

**Tags:** blockchain, bitcoind, transaction-fees, raw-transaction


---

## 2 answers

### Answer by username_1 on 2013-12-05. Score: 1 | Accepted answer

Inputs are always spent completely! Any amount of the sum of inputs that your transaction doesn't spend, implicitly becomes available to the validating miner to assign as a transaction fee to an address of his choosing.

Most clients recognize change as coming from another address that you also control and thus allow you to immediately spend it. So, your money is not frozen due to being change in another transaction.


---

### Answer by username_2 on 2013-12-03. Score: 1

The fee is the difference between the inputs and outputs, so you can specify the fee by leaving that amount unaccounted for in your transaction.

Be careful though, this has lead to 200BTC transaction fees in the past when someone forgot to include a change address: <http://www.reddit.com/r/Bitcoin/comments/1lb5my/asicminer_refunds_the_accidental_200_btc/>

> **Comments:**
> **username_0**: So is there a way to reduce the input?  
> **username_2**: no, see this for more information: http://bitcoin.stackexchange.com/questions/11411/in-getrawtransaction-what-is-the-vout-integer-in-the-vin-list  
> **username_0**: I did a bad job with the title of the question for the true question I had. To the question: "Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?" It seems the answer is no.   Since this is the answer the question in the title I'll mark it as the answer.  

---

