Bitcoin Forum
June 23, 2018, 10:44:51 PM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Calculating transaction fees programmatically ?  (Read 1055 times)
Farghaly
Jr. Member
*
Offline Offline

Activity: 38
Merit: 0


View Profile
October 26, 2014, 12:17:45 PM
 #1

Hello,

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

Thank you
1529793891
Hero Member
*
Offline Offline

Posts: 1529793891

View Profile Personal Message (Offline)

Ignore
1529793891
Reply with quote  #2

1529793891
Report to moderator
1529793891
Hero Member
*
Offline Offline

Posts: 1529793891

View Profile Personal Message (Offline)

Ignore
1529793891
Reply with quote  #2

1529793891
Report to moderator
1529793891
Hero Member
*
Offline Offline

Posts: 1529793891

View Profile Personal Message (Offline)

Ignore
1529793891
Reply with quote  #2

1529793891
Report to moderator
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1529793891
Hero Member
*
Offline Offline

Posts: 1529793891

View Profile Personal Message (Offline)

Ignore
1529793891
Reply with quote  #2

1529793891
Report to moderator
Foxpup
Legendary
*
Offline Offline

Activity: 2212
Merit: 1061



View Profile
October 26, 2014, 12:35:24 PM
 #2

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.

Will pretend to do unverifiable things (while actually eating an enchilada-style burrito) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
bitok.com
Member
**
Offline Offline

Activity: 79
Merit: 10

Best deposit/withdrawal fees on the market


View Profile WWW
October 28, 2014, 01:11:15 PM
 #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.

Bitok.com offers great value for daily traders.
Exchange BTC, LTC, DOGE to USD, EUR and RUB.
Instant exchange: https://bitok.com/instant
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!