1

I have created an account in a bitcoind wallet which has got some 1.055btc which has to be wiped out to 0.00BTC to another account. so the actual BTC has to be sent is 1.055 - transaction fee.

Is there any calculation for bitcoin to find transaction fee or any jsonrpc to find estimation fee like ethereum (balance - (gasprice*gaslimit)).

2

With recent versions of bitcoind, you can use sendtoaddress with the optional subtractfeefromamount argument.

sendtoaddress 123abc... 1.055 "" "" true

Creates a transaction with 1.055 BTC of inputs. The destination address will receive a little less than 1.055 BTC, after an appropriate fee is subtracted.

0

There are a couple of ways to estimate the transaction fee (Skip to 3 if you want an automated way to send your entire balance).

  1. You can use the Bitcoin cli. From a previous answer on how to estimate fees:

    bitcoin-cli estimatesmartfee 6
    
  2. You can also use many webservices that focus on fee estimation:

  3. Finally, you could upload your private key to a wallet such as electrum which will take care of fee estimation for you and ensure all your bitcoin is transferred.

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.