Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: areebmajeed on November 10, 2015, 06:55:53 AM



Title: Setting different fees for different transactions
Post by: areebmajeed on November 10, 2015, 06:55:53 AM
Hello!

Is there a way to set different fees for different Bitcoin transactions with Bitcoind?


Title: Re: Setting different fees for different transactions
Post by: ranochigo on November 10, 2015, 08:06:09 AM
You can set a different fee for each transactions using the command -paytxfee=(Amounthere). Input the amount as the desired BTC/KB.
For example, you can use
Code:
bitcoind -paytxfee=(AmountHere) sendtoaddress (Bitcoin address) (Amount)


Title: Re: Setting different fees for different transactions
Post by: areebmajeed on November 10, 2015, 08:08:52 AM
Beautiful! Thank you so much.


Title: Re: Setting different fees for different transactions
Post by: areebmajeed on November 10, 2015, 11:33:47 AM
Any idea how I could wrap that to JSON-RPC?

For instance,

$bitcoin->sendfrom($account,$btc_addr,(real)$btc_amt);

I'd like to add the parameter to set the txfee.


Title: Re: Setting different fees for different transactions
Post by: ranochigo on November 10, 2015, 12:22:52 PM
I'm not too familiar with using JSON-RPC in PHP but you could try using:
$bitcoin->settxfee(BTC/KB here)



Title: Re: Setting different fees for different transactions
Post by: areebmajeed on November 10, 2015, 12:25:11 PM
But, that's like changing the fee of the whole wallet every single time? What I mean is to set a different fee for every different transaction.