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

  • 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: bitcoin.stackexchange.com/questions/54583/… which can be confusing – kaykurokawa Dec 5 at 15:56

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.

New contributor
James C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 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 Dec 5 at 13:01
  • 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 en.bitcoin.it/wiki/… – James C. Dec 5 at 13:06
  • i am using the bitcoin-cli – Pankaj Kumar Dec 5 at 13:21
  • 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. Dec 5 at 13:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.