<p>When creating a raw transaction: Inputs - Outputs = Fee. If creating a raw transaction you'll need to calculate this yourself. </p>

<p><a href="https://bitcoin.org/en/developer-examples#simple-spending" rel="nofollow noreferrer">https://bitcoin.org/en/developer-examples#simple-spending</a></p>

<p>The link above will provide examples. You use their built in calculation or build your own raw transaction and set whatever fee you like by using Inputs - Outputs. There is no "rpc call" to set it that i can find or have heard of.</p>

<p>You can set variables for WALLETS in the bitcoincore config, but as you stated, you're working on managing multiple wallets for multiple users. Not sure if having bitcoincore manage every one of your wallets for a large number of users is viable or even possible. If i'm wrong, check this out:</p>

<p><a href="https://bitcoin.stackexchange.com/questions/38957/paytxfee-vs-maxtxfee-which-one-overrides-the-other">paytxfee vs maxtxfee which one overrides the other</a></p>

<p>Either way that's not the answer as it's not an "rpc call".</p>

CC BY-SA 4.0
2019-01-07T19:55:21.327Z
2019-01-07T19:55:21.327Z
cleanmarker
<p>The RPC you're looking for is <code>settxfee</code>, which sets the fee per kilo(v)byte.</p>
<p>For example <code>bitcoin-cli settxfee 0.00027100</code> is making <code>bitcoind</code> use a feerate of 27.1 sat/vbyte for all future transactions.</p>

CC BY-SA 4.0
2022-10-19T10:43:14.463Z
This is true and relevant if Bitcoin Core is used a the wallet.
However, in a wallet implementation, where the wallet puts together transactions (collects inputs, selects a subset, performs fee estimation, adds signatures) it is the wallet who deals with these, and the node is used only for broadcasting the transaction.
OptOut
CC BY-SA 4.0
2022-10-19T12:54:38.357Z
@AdamB Yes, the fee rate choice is something to be conveyed to the wallet software you're using. If that's not the Bitcoin Core wallet, you'll need to use the mechanisms that exist for that software instead. The question referred to RPC calls, however, so I assumed the asker was using Bitcoin Core.
Pieter Wuille
CC BY-SA 4.0
2021-05-27T00:21:34.633Z
2021-05-27T00:21:34.633Z
Pieter Wuille
<p>Yes there is ‘estimatesmartfee’ which computes fee with high confirmation probability within n blocks. </p>

CC BY-SA 4.0
2018-11-30T11:29:54.867Z
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
I cant see estimatesmartfee rpc call . Please let me know the parameter that is required for this rpc call.
Pankaj Kumar
CC BY-SA 4.0
2018-11-30T11:32:40.223Z
https://bitcoincore.org/en/doc/0.16.0/rpc/util/estimatesmartfee/
James C.
CC BY-SA 4.0
2018-11-30T11:47:22.077Z
estimatesmartfee   , i cant see the option to pass the argument for the account , i want to set the fee specific to account name .
As i can understand it will specify the fee for complete wallet. In my case  main wallet has different wallets with different account name or label. With above methods all the accounts have the same transactions fee
Pankaj Kumar
CC BY-SA 4.0
2018-12-01T18:02:59.347Z
@James C.: OP is asking about setting the fee, not estimating it.
Pieter Wuille
CC BY-SA 4.0
2018-12-01T18:04:40.113Z
I misunderstood. Apologies.
James C.
CC BY-SA 4.0
2018-12-05T12:51:24.357Z
James can you please let me know if there is any RPC method for setting the transaction priority. On the blockchain.com while sending the bitcoin user can set the Transaction fee. Can you please let me know which RPC call they are using for setting the transactions priority
Pankaj Kumar
CC BY-SA 4.0
2018-11-30T11:06:49.990Z
2018-11-30T11:15:02.443Z
2018-11-30T11:15:02.443Z
James C.
<p>I am creating the web wallet for the bitcoin , I want to allow web wallet users to set the transactions fee .</p>

<p>Is their is any rpc call available for setting the transactions fee (for setting transactions priority) ?</p>

<bitcoind><wallet><json-rpc>
how to set the transactions fee using the RPC call?
Pankaj Kumar
# how to set the transactions fee using the RPC call?

(Asked by: username_0 on 2018-11-30)

I am creating the web wallet for the bitcoin , I want to allow web wallet users to set the transactions fee .

Is their is any rpc call available for setting the transactions fee (for setting transactions priority) ?

**Tags:** bitcoind, wallet, json-rpc


---

## 3 answers

### Answer by username_1 on 2019-01-07. Score: 1

When creating a raw transaction: Inputs - Outputs = Fee. If creating a raw transaction you'll need to calculate this yourself.

<https://bitcoin.org/en/developer-examples#simple-spending>

The link above will provide examples. You use their built in calculation or build your own raw transaction and set whatever fee you like by using Inputs - Outputs. There is no "rpc call" to set it that i can find or have heard of.

You can set variables for WALLETS in the bitcoincore config, but as you stated, you're working on managing multiple wallets for multiple users. Not sure if having bitcoincore manage every one of your wallets for a large number of users is viable or even possible. If i'm wrong, check this out:

[paytxfee vs maxtxfee which one overrides the other](https://bitcoin.stackexchange.com/questions/38957/paytxfee-vs-maxtxfee-which-one-overrides-the-other)

Either way that's not the answer as it's not an "rpc call".


---

### Answer by username_2 on 2021-05-27. Score: 0

The RPC you're looking for is `settxfee`, which sets the fee per kilo(v)byte.

For example `bitcoin-cli settxfee 0.00027100` is making `bitcoind` use a feerate of 27.1 sat/vbyte for all future transactions.

> **Comments:**
> **username_3**: This is true and relevant if Bitcoin Core is used a the wallet. However, in a wallet implementation, where the wallet puts together transactions (collects inputs, selects a subset, performs fee estimation, adds signatures) it is the wallet who deals with these, and the node is used only for broadcasting the transaction.  
> **username_2**: @AdamB Yes, the fee rate choice is something to be conveyed to the wallet software you're using. If that's not the Bitcoin Core wallet, you'll need to use the mechanisms that exist for that software instead. The question referred to RPC calls, however, so I assumed the asker was using Bitcoin Core.  

---

### Answer by username_4 on 2018-11-30. Score: 0

Yes there is ‘estimatesmartfee’ which computes fee with high confirmation probability within n blocks.

> **Comments:**
> **username_0**: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list I cant see estimatesmartfee rpc call . Please let me know the parameter that is required for this rpc call.  
> **username_4**: https://bitcoincore.org/en/doc/0.16.0/rpc/util/estimatesmartfee/  
> **username_0**: estimatesmartfee   , i cant see the option to pass the argument for the account , i want to set the fee specific to account name . As i can understand it will specify the fee for complete wallet. In my case  main wallet has different wallets with different account name or label. With above methods all the accounts have the same transactions fee  
> **username_2**: @username_4: OP is asking about setting the fee, not estimating it.  
> **username_4**: I misunderstood. Apologies.  
> **username_0**: James can you please let me know if there is any RPC method for setting the transaction priority. On the blockchain.com while sending the bitcoin user can set the Transaction fee. Can you please let me know which RPC call they are using for setting the transactions priority  

---

