<p>I have found the way to set the fee of a transctions</p>

<p>While sending the BTC to other user we need to use the sendmany rpc call to send BTC and set the replacble parameter as true</p>

<p>next user can use the bumpfee method to pass the txid along with the fee that need to be applied to the unconfirmed transactions</p>

<p>e.g 
txid=rpc_connection.sendmany("pks891618",{"2MzLYJLb14r6jJHzW9WQpAa5xERuV9EYvn3":0.9},1 ,"moneysend" ,[],True)
print(rpc_connection.gettransaction(txid))
ftxid=rpc_connection.bumpfee(txid,{"totalFee":50000,"replaceable":True})</p>

CC BY-SA 4.0
2019-01-14T09:32:03.827Z
i guess transaction priority depends on the amount of fee you are willing to submit
Parishilan Rayamajhi
CC BY-SA 4.0
2019-01-14T07:22:58.640Z
2019-01-14T07:22:58.640Z
Pankaj Kumar
<p>The transaction priority is implied by the fee which you set for it. You can estimate the fee with your desired priority using <a href="https://bitcoincore.org/en/doc/0.16.0/rpc/util/estimatesmartfee/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.16.0/rpc/util/estimatesmartfee/</a> </p>

<p>Simply compute your transaction size (bytes) and adjust the transaction fee according to the sat/kB returned by the estimatesmartfee call.</p>

CC BY-SA 4.0
2018-12-05T13:01:29.783Z
Sorry James but how fee can be set , the above method is returning the estimate fee , 
Here is what i want to allow my wallet customer  ..
Suppose customer want that his transaction can be done fast and he is ready to pay more for the transaction fee . Which method allow me to do this
Pankaj Kumar
CC BY-SA 4.0
2018-12-05T13:06:48.330Z
Are you using bitcoind wallet? If not, you need to compute the size of your signed transaction manually. Since you haven't signed it without knowing the fee, you can assume a DER signature to be 72 Bytes long, though it could be as short as 70. Then, make sure your output amounts - input amounts = feerate * tx_bytes. For scripting raw transactions, see https://en.bitcoin.it/wiki/Raw_Transactions#createrawtransaction_.5B.7B.22txid.22:txid.2C.22vout.22:n.7D.2C....5D_.7Baddress:amount.2C....7D
James C.
CC BY-SA 4.0
2018-12-05T13:21:23.197Z
i am using the bitcoin-cli
Pankaj Kumar
CC BY-SA 4.0
2018-12-05T13:25:28.910Z
Ok - use createrawtransaction. But also try to understand the tx length you want to build (version, inputs, outputs, locktime, witness), so you know how many tx bytes you are dealing with.
James C.
CC BY-SA 4.0
2019-01-04T08:55:49.363Z
James i am using the bitcoin RPC calls to send coin from one wallet to another.  Suppose A user sending 0.01 BTC to B. 1) While sending how user A come to know how much fee will be applied 2) If A select custom fee , how that can be applied to the current transactions
Pankaj Kumar
CC BY-SA 4.0
2019-01-04T08:58:57.317Z
I am not sure I understand your question. Each tx requires an estimate of the required mining fee to receive confirmation within reasonable time after being broadcast. Subsequent txs must repeat this process independently, as the blocks may have gotten full or empty and the necessary fee rate has changed.
James C.
CC BY-SA 4.0
2019-01-04T09:15:30.810Z
User regiser with username and i am making the rpc regtest call to assign he wallet adddress to the username 
Now user can send and recieve the BTC . On the server i am using rpc call to send and recieve BTC.
Now here is what i needed
1) Suppose User A wants to send BTC to B user .
2) While A sending the BTC to B on the form there must be a option to select the transcation priority (If his transacation can be processed on high priority or not. )
A can also select the custom fee (sat/byte)
3) I cant see any rpc call for  custom fee or transaction priority
Pankaj Kumar
CC BY-SA 4.0
2019-01-04T09:18:06.877Z
Because the priority or fee us implied in the tx. It is the difference between output amounts and previous output amounts referenced by the inputs. The fee is not explicitly set somewhere, it is simply subtracted from the available previous output amount referenced by your tx.
James C.
CC BY-SA 4.0
2019-01-04T09:39:41.047Z
Please check this screenshot  https://www.awesomescreenshot.com/image/3807635/a65560c9fd2af89cf268a350bae80dd5.  Blockchain.com allowing the user to selection priority and also customize the fee .
Pankaj Kumar
CC BY-SA 4.0
2019-01-04T10:29:37.793Z
Yes, it will add the fee automatically, so person B will receive the amount you specified, but the “input” amount will be higher, namely by the fee amount. But on the protocol level, there is no fee data structure, just input amounts (referenced) and output amounts (explicitly encoded).
James C.
CC BY-SA 4.0
2019-01-08T12:03:51.777Z
PrioritiseTransaction  , James i have found this RPC call , can you please check it   https://bitcoin.org/en/developer-reference#prioritisetransaction .I think with this we can set the priority for the transaction
Pankaj Kumar
CC BY-SA 4.0
2019-01-08T12:05:39.843Z
This call only prioritizes the tx for miners who are building new block templates from the mempool of your node. It will not prioritize for any other miners on the network, they only see your fee and prioritize accordingly.
James C.
CC BY-SA 4.0
2019-01-08T12:10:24.963Z
Ok Suppose , my node have a transaction with high fee(more then all bitcoin network ) then what are the possibilities that the next block will add this transactions on the bitcoin network ?
Pankaj Kumar
CC BY-SA 4.0
2019-01-08T13:47:26.323Z
Good question, check recently confirmed block txs to get an estimate. There are bitcoin fee estimation algorithms you can find and research on the web.
James C.
CC BY-SA 4.0
2018-12-05T12:56:41.107Z
2018-12-05T12:56:41.107Z
James C.
<p>Is there is any bitcoin RPC call for setting the transactions priority ?</p>

CC BY-SA 4.0
2018-12-05T15:56:56.307Z
you may want to rephrase your question, what do you mean exactly when you say "transaction priority". You just want it to confirm faster? This term also used to refer to a specific thing which no longer exists in new clients: https://bitcoin.stackexchange.com/questions/54583/why-is-the-transaction-priority-removed which can be confusing
k kurokawa
<bitcoin-core><json-rpc>
Which Bitcoin RPC call is used for setting transaction priority?
Pankaj Kumar
# Which Bitcoin RPC call is used for setting transaction priority?

(Asked by: username_0 on 2018-12-05)

Is there is any bitcoin RPC call for setting the transactions priority ?

**Tags:** bitcoin-core, json-rpc

> **Comments:**
> **username_1**: you may want to rephrase your question, what do you mean exactly when you say "transaction priority". You just want it to confirm faster? This term also used to refer to a specific thing which no longer exists in new clients: https://bitcoin.stackexchange.com/questions/54583/why-is-the-transaction-priority-removed which can be confusing  

---

## 2 answers

### Answer by username_0 on 2019-01-14. Score: 0 | Accepted answer

I have found the way to set the fee of a transctions

While sending the BTC to other user we need to use the sendmany rpc call to send BTC and set the replacble parameter as true

next user can use the bumpfee method to pass the txid along with the fee that need to be applied to the unconfirmed transactions

e.g
txid=rpc\_connection.sendmany("pks891618",{"2MzLYJLb14r6jJHzW9WQpAa5xERuV9EYvn3":0.9},1 ,"moneysend" ,[],True)
print(rpc\_connection.gettransaction(txid))
ftxid=rpc\_connection.bumpfee(txid,{"totalFee":50000,"replaceable":True})

> **Comments:**
> **username_2**: i guess transaction priority depends on the amount of fee you are willing to submit  

---

### Answer by username_3 on 2018-12-05. Score: 1

The transaction priority is implied by the fee which you set for it. You can estimate the fee with your desired priority using <https://bitcoincore.org/en/doc/0.16.0/rpc/util/estimatesmartfee/>

Simply compute your transaction size (bytes) and adjust the transaction fee according to the sat/kB returned by the estimatesmartfee call.

> **Comments:**
> **username_0**: Sorry username_3 but how fee can be set , the above method is returning the estimate fee ,  Here is what i want to allow my wallet customer  .. Suppose customer want that his transaction can be done fast and he is ready to pay more for the transaction fee . Which method allow me to do this  
> **username_3**: Are you using bitcoind wallet? If not, you need to compute the size of your signed transaction manually. Since you haven't signed it without knowing the fee, you can assume a DER signature to be 72 Bytes long, though it could be as short as 70. Then, make sure your output amounts - input amounts = feerate * tx_bytes. For scripting raw transactions, see https://en.bitcoin.it/wiki/Raw_Transactions#createrawtransaction_.5B.7B.22txid.22:txid.2C.22vout.22:n.7D.2C....5D_.7Baddress:amount.2C....7D  
> **username_0**: i am using the bitcoin-cli  
> **username_3**: Ok - use createrawtransaction. But also try to understand the tx length you want to build (version, inputs, outputs, locktime, witness), so you know how many tx bytes you are dealing with.  
> **username_0**: username_3 i am using the bitcoin RPC calls to send coin from one wallet to another.  Suppose A user sending 0.01 BTC to B. 1) While sending how user A come to know how much fee will be applied 2) If A select custom fee , how that can be applied to the current transactions  
> **username_3**: I am not sure I understand your question. Each tx requires an estimate of the required mining fee to receive confirmation within reasonable time after being broadcast. Subsequent txs must repeat this process independently, as the blocks may have gotten full or empty and the necessary fee rate has changed.  
> **username_0**: User regiser with username and i am making the rpc regtest call to assign he wallet adddress to the username  Now user can send and recieve the BTC . On the server i am using rpc call to send and recieve BTC. Now here is what i needed 1) Suppose User A wants to send BTC to B user . 2) While A sending the BTC to B on the form there must be a option to select the transcation priority (If his transacation can be processed on high priority or not. ) A can also select the custom fee (sat/byte) 3) I cant see any rpc call for  custom fee or transaction priority  
> **username_3**: Because the priority or fee us implied in the tx. It is the difference between output amounts and previous output amounts referenced by the inputs. The fee is not explicitly set somewhere, it is simply subtracted from the available previous output amount referenced by your tx.  
> **username_0**: Please check this screenshot  https://www.awesomescreenshot.com/image/3807635/a65560c9fd2af89cf268a350bae80dd5.  Blockchain.com allowing the user to selection priority and also customize the fee .  
> **username_3**: Yes, it will add the fee automatically, so person B will receive the amount you specified, but the “input” amount will be higher, namely by the fee amount. But on the protocol level, there is no fee data structure, just input amounts (referenced) and output amounts (explicitly encoded).  
> **username_0**: PrioritiseTransaction  , username_3 i have found this RPC call , can you please check it   https://bitcoin.org/en/developer-reference#prioritisetransaction .I think with this we can set the priority for the transaction  
> **username_3**: This call only prioritizes the tx for miners who are building new block templates from the mempool of your node. It will not prioritize for any other miners on the network, they only see your fee and prioritize accordingly.  
> **username_0**: Ok Suppose , my node have a transaction with high fee(more then all bitcoin network ) then what are the possibilities that the next block will add this transactions on the bitcoin network ?  
> **username_3**: Good question, check recently confirmed block txs to get an estimate. There are bitcoin fee estimation algorithms you can find and research on the web.  

---

