1

BitGo.com gives you the options of 'high priority', 'medium priority', 'low priority' and 'very low priority' for setting miners fee when sending bitcoin with their web wallet.

I am using their API to send bitcoins to different addresses. How do I calculate the miners fee (corresponding to any of the various priorities) to pass to the API when sending bitcoins.

Simply put, if I want to send 0.01BTC to an address with medium priority, how do I calculate the miners fee for medium priority (and the others) with their API or any other API.

0

When using the sendCoins call from the BitGo API, you can use one of three parameters to specify fees for the transactions (using more than one will result in an error, as they are not compatible).

  • feeTxConfirmTarget: You specify the count of blocks you would like your transaction to confirm in, between 1 and 1000. This parameter probably fits your description best. Subjectively, I'd set it to somewhere between 6 and 12 blocks for "medium priority".
  • feeRate: If you know exactly what fee rate you want to use, you can specify it with this parameter in satoshis/kilobyte.
  • fee: You can specify the exact amount of satoshis that you want to provide as a fee. Unless you know for sure how many bytes your transaction will have, this is difficult to pick correctly. (For completeness, not recommended for your usecase.)

If you use none of the above, the fee rate will be picked automatically. As far as I recall, it will default to feeTxConfirmTarget: 2, i.e. aim for confirmation in two blocks.

1

You can get up-to-date Bitcoin transaction fees from bitcoinfees.21.co.

They also have an API.

If you are a coder, you can use the API to provide a dropdown list allowing your members/users to select the priority they want to use when making a transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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