Author

Topic: Raw transaction - bitcoin how to calculate transaction fees. (Read 930 times)

hero member
Activity: 699
Merit: 501
> How to calculate raw transaction fees for developers -
> Bitcoin Fees for Transactions
> Calculator for estimated TX-Fees
> Bitcoind - How to calculate transaction size before sending
> How does the bitcoin transaction fee be calculated?
> Add fee to bitcoin transaction
> Bitcoin raw tx fee

There's literally a lack of information, for developers, about this topic. This is merely to help people from making mistakes.

Hey danny

When building and broadcasting a raw bitcoin transaction, are transaction fees specified on the raw transaction, or by the service running bitcoind, such as https://blockchain.info/pushtx

The raw transaction specifies the transaction inputs (which supply value to the transaction) and the transaction outputs (which identify how much of that value goes to each output).

To specify a transaction fee, make sure the sum of the values of the outputs is LESS THAN the sum of the values of the inputs.  The difference IS the transaction fee.

Hey Dan,

Thanks for the answer.

so if I specify 1 bitcoin as input, and use 0.6 bitcoin, would the remaining 0.4 bitcoin be used as fees, or would an arbitrary amount be taken from 0.4, and the remaining, returned to me.

Nothing is returned to you unless you specifically create an output to return it.  If you only create 0.6 BTC worth of outputs, and you included 1 BTC worth of inputs, then the fee will be 0.4 BTC.

As I said:

"The difference IS the transaction fee"


--
--






sorry for the wrong pm

Jump to: