Bitcoin Forum
May 14, 2024, 08:02:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON-RPC Transaction fee?  (Read 1388 times)
Eli (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100



View Profile
September 02, 2011, 12:38:55 AM
 #1

How can I get the transaction fee before sending the transaction?

There doesn't seem to be documentation about it in the wiki.
Anonymous
Guest

September 02, 2011, 03:26:11 AM
 #2

How can I get the transaction fee before sending the transaction?

There doesn't seem to be documentation about it in the wiki.
First, use the get info method. Then it should be tx fee of paytxfee or something like that in that getinfo response dictionary
Eli (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100



View Profile
September 02, 2011, 05:57:57 AM
 #3

So basically there are only tow ways that I'm going to pay a fee:

1. I try to send an amount lower than 0.01 - Fee is 0.005
2. The system is telling me that I need to pay fee (because the block contains a lot of transactions?) - Fee is 0.005

The first method is easy, just check if I'm sending less than 1 bitcent,
To know in the second part I need to do getinfo and the paytxfee is above 0

Right? Feel free to correct where I'm wrong...
mtbitcoin
Legendary
*
Offline Offline

Activity: 876
Merit: 1000


Etherscan.io


View Profile
September 02, 2011, 11:12:00 AM
 #4

From what i understand you are going to have to work backwards. Send the transaction first, then do a look up using the txID info to see if a  fee has been applied.

Cheers

EtherScan::Ethereum Block Explorer | BlockScan::Coming Soon
BladeMcCool
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
September 14, 2011, 09:41:02 PM
 #5

This is unacceptable. I have mine configured as well with paytxfee=0.0 and yet transactions I put through bitcoind on command line or with json rpc are applying a fee.

I just put in a transaction 73c294e732dac0b0cfe2da6633aec7cd66616d4b9f9e27b629bda31f8d8e1f5e for 0.0192 which generated 0.0005 in fees. We need to be able to block the user from making a transaction that will put their account balance negative. To me this is a pretty serious bug, that I've told it to send no fees and yet its sending fees instead of throwing errors.
mtbitcoin
Legendary
*
Offline Offline

Activity: 876
Merit: 1000


Etherscan.io


View Profile
September 15, 2011, 06:48:34 AM
 #6

This is unacceptable. I have mine configured as well with paytxfee=0.0 and yet transactions I put through bitcoind on command line or with json rpc are applying a fee.

I just put in a transaction 73c294e732dac0b0cfe2da6633aec7cd66616d4b9f9e27b629bda31f8d8e1f5e for 0.0192 which generated 0.0005 in fees. We need to be able to block the user from making a transaction that will put their account balance negative. To me this is a pretty serious bug, that I've told it to send no fees and yet its sending fees instead of throwing errors.

I felt the same way when i first figured that out. The bitcoin client would warn you a impending transaction fee but when sending from command line (bitcoind) it does no such thing. As such from a commerce point of view this can get tricky, which 0.0005 is small amount but from what i understand if the transfer is large enough its possible to incur higher transactions fees which would kinda of suck.

I would propose that you could put in place a fixed transfer fee for all transactions (i.e 0.001) if you are running a free service or absorb the transfer fees if you're running a "for-a-profit" operation as part of doing business

Cheers

EtherScan::Ethereum Block Explorer | BlockScan::Coming Soon
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!