<p><code>settxfee</code> sets the transaction fee per kilobyte, as that is the relevant unit for prioritization on the network and in blocks.</p>

<p>With <code>sendtoaddress</code> the size (in bytes) is not known ahead of time, so you can't set the exact fee.</p>

CC BY-SA 3.0
2016-04-20T17:50:58.873Z
is there a way i can implement a dynamic fee for my transactions ?
octav
CC BY-SA 3.0
2016-04-20T18:05:39.767Z
What does dynamic fee mean?
Pieter Wuille
CC BY-SA 3.0
2016-04-20T18:15:41.317Z
fee that will vary based on network load so that my transaction will confirm 100%
octav
CC BY-SA 3.0
2016-04-20T18:17:18.883Z
If you don't use settxfee, Bitcoin Core will use the results of automatic fee estimation.
Pieter Wuille
CC BY-SA 3.0
2016-05-30T17:25:38.627Z
@PieterWuille really? since which version?
knocte
CC BY-SA 3.0
2016-06-20T07:43:41.213Z
@knocte: I think since [0.12.0](https://bitcoin.org/en/release/v0.12.0#wallet-transaction-fees).
Murch
CC BY-SA 3.0
2016-06-20T07:48:58.893Z
do you have the source for that?
knocte
CC BY-SA 3.0
2016-06-20T11:19:33.800Z
https://bitcoin.org/en/release/v0.12.0#wallet-transaction-fees
Pieter Wuille
CC BY-SA 3.0
2016-04-20T17:46:58.943Z
2016-04-20T17:46:58.943Z
Pieter Wuille
<p>What version of bitcoind do you have? </p>

<p>That is known issue about updated bitcoind server. Calculation of transaction size has been changed. Before update, transaction with 255 bytes size was rounded <em>up</em> to 1 Kb and your settxfee value was used. But now, it calculates accurate value of transaction size and calculates fee according to it, without rounding up.</p>

<p>Read here: <a href="https://github.com/bitcoin/bitcoin/issues/7633" rel="nofollow">https://github.com/bitcoin/bitcoin/issues/7633</a></p>

CC BY-SA 3.0
2016-08-25T11:03:25.083Z
2016-08-25T11:03:25.083Z
Dmitriy Apollonin
<p>I am using settxfee(0.00020) before sendtoaddress RPC call however after sending 0.042 in blockchain a fee of 0.000045 is showing.</p>

<p>How can I set the fee properly ?</p>

<p>Thanks</p>

<bitcoind><transaction-fees>
Settxfee does not work in RPC
octav
# Settxfee does not work in RPC

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

I am using settxfee(0.00020) before sendtoaddress RPC call however after sending 0.042 in blockchain a fee of 0.000045 is showing.

How can I set the fee properly ?

Thanks

**Tags:** bitcoind, transaction-fees


---

## 2 answers

### Answer by username_1 on 2016-04-20. Score: 4

`settxfee` sets the transaction fee per kilobyte, as that is the relevant unit for prioritization on the network and in blocks.

With `sendtoaddress` the size (in bytes) is not known ahead of time, so you can't set the exact fee.

> **Comments:**
> **username_0**: is there a way i can implement a dynamic fee for my transactions ?  
> **username_1**: What does dynamic fee mean?  
> **username_0**: fee that will vary based on network load so that my transaction will confirm 100%  
> **username_1**: If you don't use settxfee, Bitcoin Core will use the results of automatic fee estimation.  
> **username_2**: @username_1 really? since which version?  
> **username_3**: @username_2: I think since [0.12.0](https://bitcoin.org/en/release/v0.12.0#wallet-transaction-fees).  
> **username_2**: do you have the source for that?  
> **username_1**: https://bitcoin.org/en/release/v0.12.0#wallet-transaction-fees  

---

### Answer by username_4 on 2016-08-25. Score: 1

What version of bitcoind do you have?

That is known issue about updated bitcoind server. Calculation of transaction size has been changed. Before update, transaction with 255 bytes size was rounded *up* to 1 Kb and your settxfee value was used. But now, it calculates accurate value of transaction size and calculates fee according to it, without rounding up.

Read here: <https://github.com/bitcoin/bitcoin/issues/7633>


---

