Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Eli on September 02, 2011, 12:38:55 AM



Title: JSON-RPC Transaction fee?
Post by: Eli on September 02, 2011, 12:38:55 AM
How can I get the transaction fee before sending the transaction?

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


Title: Re: JSON-RPC Transaction fee?
Post by: Anonymous on September 02, 2011, 03:26:11 AM
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


Title: Re: JSON-RPC Transaction fee?
Post by: Eli on September 02, 2011, 05:57:57 AM
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...


Title: Re: JSON-RPC Transaction fee?
Post by: mtbitcoin on September 02, 2011, 11:12:00 AM
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


Title: Re: JSON-RPC Transaction fee?
Post by: BladeMcCool on September 14, 2011, 09:41:02 PM
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.


Title: Re: JSON-RPC Transaction fee?
Post by: mtbitcoin on September 15, 2011, 06:48:34 AM
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