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

<p><code>estimatefee 1</code> returns the fee estimated to result in confirmation within 1 block.</p>

CC BY-SA 3.0
2016-04-30T18:41:25.097Z
2016-04-30T18:41:25.097Z
Tom Harding
<p>I want to run the following command via <code>bitcoin-cli</code>: </p>

<pre><code>./bitcoin-cli sendfrom "10302c02147e2948cbejd9a2bd80d9691ef08a6a4d416c2bb602143a4anj06b90e" "32cjBTQkfLBp38ixj7hdjk0cc90VPPnwhQ" 3.04384215 
</code></pre>

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

<p>What I want to understand is, how do I add the fee to the transaction? On the <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow">API calls list</a>, I found the command <code>settxfee</code> and amount</p>

<p>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. </p>

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

<bitcoind><transaction-fees><raw-transaction><bitcoin-cli>
How can I set the transaction fee when creating a transaction through Bitcoin-cli commands?
PythonRocks
# How can I set the transaction fee when creating a transaction through Bitcoin-cli commands?

(Asked by: username_0 on 2016-04-27)

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](https://en.bitcoin.it/wiki/Original_Bitcoin_client/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?

**Tags:** bitcoind, transaction-fees, raw-transaction, bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2016-04-30. Score: 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.


---

