Author

Topic: Calculating transaction fees programmatically ? (Read 1181 times)

member
Activity: 79
Merit: 10
Best deposit/withdrawal fees on the market
October 28, 2014, 08:11:15 AM
#3
Bitcoind Json RPC api allows you to create raw transaction, so you can add any fee you like. For now we are using bitcoind sendtoaddress api call, which calculates fee automatically, but are considering raw transaction generation.
legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
Bytes.

  • Is it possible to calculate tx size from its hex ?
Yes. There are two hex digits to a byte. Count the number of hex digits, divide by two, and that's the size in bytes. Note if you have a program that is processing transactions, it already has the raw data, and hence already knows how many bytes there are.

  • Is there any reference implementation on calculating tx fee from size ?
Bitcoin Core.
newbie
Activity: 38
Merit: 0
Hello,

Regarding transaction fees https://en.bitcoin.it/wiki/Transaction_fee i have several unanswered questions:

Thank you
Jump to: