bit: Transfer BTC. InsufficientFunds

When I try to create a transaction, it gives an error that there are not enough funds on the balance: bit.exceptions.InsufficientFunds: Balance 54022 is less than 60800 (including fee).

key.send([(address, 0.0001, 'btc')], fee=200) 0.0001 btc = 10000 satoshi. So total is 30000 satoshi (0.0003 btc).

Why im getting error? I noticed that when transferring the indicated amount, it is added to the whole balance and is trying to transfer it.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I solved the problem. It would be convenient if this function was developed. If necessary, I can provide a code. I would be grateful if you contribute to the project.

The fee argument normally denotes a rate (satoshis per byte). So for a simple transaction with e.g. one input and output the size will be around 250 bytes. Setting the fee rate to 200 would result in around 250bytes * 200 satoshis/byte = 50000 satoshis for the fee.

You don’t have enough funds to cover for both the amount you send and the cost of fee with that fee rate.

Beware that an absolute fee value of 200 satoshis is currently very low and may not confirm in time, whereas a fee rate of 200 satoshis/byte would probably confirm with the next block.