<p>If your transaction is from Bitcoin Core's wallet, you can use the <code>bumpfee</code> command. It should do the same thing that the GUI does in order to create a replacement transaction with a higher fee.</p>

CC BY-SA 3.0
2018-02-06T03:57:09.903Z
2018-02-06T03:57:09.903Z
Ava Chow
<p>I think you can calculate fees manually by getting last block total fees divided on number of transactions in this block. Also you need to use summary amount of block transactions. It is not so hard to calculate it for your TX amount.</p>

<p>Then you can rebuild your "stuck" transaction with a new fee. And broadcast this new transaction through the network.</p>

CC BY-SA 3.0
2018-02-12T06:55:21.183Z
2018-02-12T06:55:21.183Z
Denis Leonov
<p>Imagine I have a "stuck" transaction using Bitcoin Core (with correct BIP125 signalling), and I want to "unstuck" it using RBF.</p>

<p>Is there some RPC call for the correct fee calculation?</p>

<p>Meaning, is there a call that would help me with creating a transaction that will be accepted in a certain block target, given the current fee estimations? Ideally in the same way the GUI version already does it.</p>

<p>I know it is possible to calculate that using <code>getmempoolentry</code> (<code>ancestorfees</code> and <code>ancestorsize</code>) and <code>estimatesmartfee</code>, but that is non-trivial.</p>

<json-rpc><replace-by-fee><fee-estimation>
Are there RPC calls for correct RBF calculations in Bitcoin Core?
Karel Bílek
# Are there RPC calls for correct RBF calculations in Bitcoin Core?

(Asked by: username_0 on 2018-01-28)

Imagine I have a "stuck" transaction using Bitcoin Core (with correct BIP125 signalling), and I want to "unstuck" it using RBF.

Is there some RPC call for the correct fee calculation?

Meaning, is there a call that would help me with creating a transaction that will be accepted in a certain block target, given the current fee estimations? Ideally in the same way the GUI version already does it.

I know it is possible to calculate that using `getmempoolentry` (`ancestorfees` and `ancestorsize`) and `estimatesmartfee`, but that is non-trivial.

**Tags:** json-rpc, replace-by-fee, fee-estimation


---

## 2 answers

### Answer by username_1 on 2018-02-06. Score: 3 | Accepted answer

If your transaction is from Bitcoin Core's wallet, you can use the `bumpfee` command. It should do the same thing that the GUI does in order to create a replacement transaction with a higher fee.


---

### Answer by username_2 on 2018-02-12. Score: -1

I think you can calculate fees manually by getting last block total fees divided on number of transactions in this block. Also you need to use summary amount of block transactions. It is not so hard to calculate it for your TX amount.

Then you can rebuild your "stuck" transaction with a new fee. And broadcast this new transaction through the network.


---

