Author

Topic: BitcoinCore: How to use bumpfee command the right way? (Read 201 times)

newbie
Activity: 13
Merit: 16
I can confirm that both variations are working on my system

Code:
bitcoin-cli bumpfee "TXID" '{"fee_rate":20}'
AND
Code:
bitcoin-cli bumpfee "TXID" "{\"fee_rate\":20}"

Thanks for the support Smiley
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Tanks for all the replies! It makes sense that the error is coming from an incorrectly constructed json object.
I am using MacOS 11.4 and BitcoinCore 0.21.1.
So how do I use the options for a command on my system correctly?
I'm not using Mac but the best way to find out which will work is to try them.
Use it the way you're using bitcoin-cli, just fix the last part (the json object) where you missed a few quotation marks.

Code:
./bitcoin-cli bumpfee "TXID" "{\"fee_rate\":20}"
Or the other one.
newbie
Activity: 13
Merit: 16
Tanks for all the replies! It makes sense that the error is coming from an incorrectly constructed json object.
I am using MacOS 11.4 and BitcoinCore 0.21.1.
So how do I use the options for a command on my system correctly?

Code:
bumpfee "TXID" '{"fee_rate":20}'
OR
Code:
bumpfee "TXID" "{\"fee_rate\":20}"

Thanks for your help
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
This will not work on Windows CMD because the single quotes are not interpreted as combining all the characters together into one string. This is particularly a problem for JSON because commas are treated the same as spaces for parsing delimiters. You have to use the double-quote version, or use Powershell instead.
I suppose he's not using Windows CMD because his original command starts with "./" which wont work in it.
AFAIK the first example won't work in PowerShell either, just the other option but instead of "{\"fee_rate\":20}", should be: '{\"fee_rate\":20}' in PowerShell.

It's better if he mentioned his OS, right?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Code:
bumpfee "TXID" '{"fee_rate":20}'

This will not work on Windows CMD because the single quotes are not interpreted as combining all the characters together into one string. This is particularly a problem for JSON because commas are treated the same as spaces for parsing delimiters. You have to use the double-quote version, or use Powershell instead.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
./bitcoin-cli bumpfee "Txid" {"fee_rate":20}

but it throws an error: Error parsing JSON: {fee_rate:
The error indicates that the json object was constructed incorrectly.

If you want to add an optional "fee_rate", you just have to enclose it with either a single quotation marks or alternate the use of \" and ".
Examples:
Code:
bumpfee "TXID" '{"fee_rate":20}'
Code:
bumpfee "TXID" "{\"fee_rate\":20}"



https://chainquery.com/bitcoin-cli/bumpfee

The error is caused by the use of a statement that is not among those options.
Chainquery's bitcoin RPC is based from v0.18, which is quite outdated.
You can refer to: https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/bumpfee/ for the updated options.
legendary
Activity: 2702
Merit: 4002
Hi

I created a transaction with the RBF option. Now I want to try the bumpfee command and set a specific fee.

./bitcoin-cli bumpfee "Txid" {"fee_rate":20}

but it throws an error: Error parsing JSON: {fee_rate:


Pleas help. How do I use the options of a bitcoin-cli command properly?

the right way is ---> bumpfee "txid" ( options )
The options you are allowed to use this instruction are shown in the link below.

https://chainquery.com/bitcoin-cli/bumpfee


The error is caused by the use of a statement that is not among those options.
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
What version do you use? For versions older than 0.21 the fee_rate must be in btc per Kvb.

Converting 20 sat/vb gives us 0.0002 btc/Kvb. So if you're using an old version replace 20 by 0.0002 and see if it works.

Also make sure that:
    - the new fee is higher than the original fee plus relay fee.
    - the change output or inputs in your wallet are enough to cover the difference.
Otherwise the transaction will fail.

Since version 0.21 the fee rate is in sat/vb, for older versions it's in btc/Kvb
newbie
Activity: 13
Merit: 16
Hi

I created a transaction with the RBF option. Now I want to try the bumpfee command and set a specific fee.

./bitcoin-cli bumpfee "Txid" {"fee_rate":20}

but it throws an error: Error parsing JSON: {fee_rate:


Pleas help. How do I use the options of a bitcoin-cli command properly?
Jump to: