bumpfee
Overview
The 'bumpfee' Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.
Request
- shell
- csharp
- php
- python
- javascript
- go
- ruby
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 4303fb63-adec-42dc-b571-74bc2f2a5167' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"bumpfee","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://bitcoin-mainnet.node.coinapi.io");
request.Headers.Add("x-coinapi-key", "73034021-THIS-IS-SAMPLE-KEY");
request.Headers.Add("accept", "application/json");
var content = new StringContent("{\"jsonrpc\":\"2.0\",\"method\":\"bumpfee\",\"params\": [],\"id\":1}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
<?php
$client = new Client();
$headers = [
'x-coinapi-key' => '73034021-THIS-IS-SAMPLE-KEY',
'Content-Type' => 'application/json',
'accept' => 'application/json'
];
$body = '{
"jsonrpc": "2.0",
"method": "bumpfee",
"params": [],
"id": 1
}';
$request = new Request('POST', 'https://bitcoin-mainnet.node.coinapi.io', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
?>
import requests
import json
url = "https://bitcoin-mainnet.node.coinapi.io"
payload = json.dumps({
"jsonrpc": "2.0",
"method": "bumpfee",
"params": [],
"id": 1
})
headers = {
'x-coinapi-key': '73034021-THIS-IS-SAMPLE-KEY',
'Content-Type': 'application/json',
'accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var settings = {
"url": "https://bitcoin-mainnet.node.coinapi.io",
"method": "POST",
"timeout": 0,
"headers": {
"x-coinapi-key": "4303fb63-adec-42dc-b571-74bc2f2a5167",
"Content-Type": "application/json",
"accept": "application/json"
},
"data": JSON.stringify({
"jsonrpc": "2.0",
"method": "bumpfee",
"params": [],
"id": 1
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://bitcoin-mainnet.node.coinapi.io"
method := "POST"
payload := strings.NewReader(`{"jsonrpc":"2.0","method":"bumpfee","params": [],"id":1}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-coinapi-key", "73034021-THIS-IS-SAMPLE-KEY")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("accept", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
require "uri"
require "json"
require "net/http"
url = URI("https://bitcoin-mainnet.node.coinapi.io")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-coinapi-key"] = "73034021-THIS-IS-SAMPLE-KEY"
request["Content-Type"] = "application/json"
request["accept"] = "application/json"
request.body = JSON.dump({
"jsonrpc": "2.0",
"method": "bumpfee",
"params": [],
"id": 1
})
response = https.request(request)
puts response.read_body
Request Parameters
- txid: The txid to be bumped
- options
Response
{
"result": null,
"error": {
"code": -1,
"message": "bumpfee \"txid\" ( options )\n\nBumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.\nAn opt-in RBF transaction with the given txid must be in the wallet.\nThe command will pay the additional fee by reducing change outputs or adding inputs when necessary.\nIt may add a new change output if one does not already exist.\nAll inputs in the original transaction will be included in the replacement transaction.\nThe command will fail if the wallet or mempool contains a transaction that spends one of T's outputs.\nBy default, the new fee will be calculated automatically using the estimatesmartfee RPC.\nThe user can specify a confirmation target for estimatesmartfee.\nAlternatively, the user can specify a fee rate in sat/vB for the new transaction.\nAt a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee\nreturned by getnetworkinfo) to enter the node's mempool.\n* WARNING: before version 0.21, fee_rate was in BTC/kvB. As of 0.21, fee_rate is in sat/vB. *\n\nArguments:\n1. txid (string, required) The txid to be bumped\n2. options (json object, optional)\n {\n \"conf_target\": n, (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks\n \n \"fee_rate\": amount, (numeric or string, optional, default=not set, fall back to wallet fee estimation) \n Specify a fee rate in sat/vB instead of relying on the built-in fee estimator.\n Must be at least 1.000 sat/vB higher than the current transaction fee rate.\n WARNING: before version 0.21, fee_rate was in BTC/kvB. As of 0.21, fee_rate is in sat/vB.\n \n \"replaceable\": bool, (boolean, optional, default=true) Whether the new transaction should still be\n marked bip-125 replaceable. If true, the sequence numbers in the transaction will\n be left unchanged from the original. If false, any input sequence numbers in the\n original transaction that were less than 0xfffffffe will be increased to 0xfffffffe\n so the new transaction will not be explicitly bip-125 replaceable (though it may\n still be replaceable in practice, for example if it has unconfirmed ancestors which\n are replaceable).\n \n \"estimate_mode\": \"str\", (string, optional, default=\"unset\") The fee estimate mode, must be one of (case insensitive):\n \"unset\"\n \"economical\"\n \"conservative\"\n }\n\nResult:\n{ (json object)\n \"txid\" : \"hex\", (string) The id of the new transaction.\n \"origfee\" : n, (numeric) The fee of the replaced transaction.\n \"fee\" : n, (numeric) The fee of the new transaction.\n \"errors\" : [ (json array) Errors encountered during processing (may be empty).\n \"str\", (string)\n ...\n ]\n}\n\nExamples:\n\nBump the fee, get the new transaction's txid\n> bitcoin-cli bumpfee <txid>\n"
},
"id": 1
}
Was this section helpful?