How can I set the transaction fee when creating a transaction through Bitcoin-cli commands?

2

I want to run the following command via bitcoin-cli:

./bitcoin-cli sendfrom "10302c02147e2948cbejd9a2bd80d9691ef08a6a4d416c2bb602143a4anj06b90e" "32cjBTQkfLBp38ixj7hdjk0cc90VPPnwhQ" 3.04384215 

(Note the account and address to above are not real, as I edited the info)

What I want to understand is, how do I add the fee to the transaction? On the API calls list, I found the command settxfee and amount

But where do I put this in the command? Also, the option of GUI and other wallets or sort is not an option. I have to run this via command line.

And bonus question: Where can I find out what the fee should be to clear within one block?

PythonRocks

Posted 2016-04-27T23:08:13.537

Reputation: 21

Answers

3

settxfee sets the fee/kb for future API calls like sendfrom. It is remains in effect as long as the program runs.

estimatefee 1 returns the fee estimated to result in confirmation within 1 block.

Tom Harding

Posted 2016-04-27T23:08:13.537

Reputation: 336