Custom Fee
Hey,
I wanted send BitCoin to another address with custom Fee, something like in this way: outputs = [ ('15diEFuNbTMRMzmwBXnNE2XhzJjBrdpc2t', 0.00000075, 'btc') ] key.send(outputs, fee=55, absolute_fee=True)
I get this from -> https://ofek.github.io/bit/dev/api.html#bit.PrivateKey.get_transactions
But, when i try send it in this way here is what i get: ..in broadcast_tx raise ConnectionError('Transaction broadcast failed, or ' ConnectionError: Transaction broadcast failed, or Unspents were already used.
What is the right way to send this Coins with own Fees?
BTW. Amazing Project! Really love it!
Each Bitcoin node can have their own policy regarding what it defines as "dust". I think when you try to send the transaction using one of the web APIs there are two things happening:
- Your output amount is only
75satoshis, which may be considered too low as it will cost more to spend the output, and - you define an absolute fee of only
55satoshis, which is definately under a 1 satoshi per byte fee rate and will therefore most probably not be relayed through the network.
The option to set absolute_fee=True is an advanced setting, as it is under normal circumstances better to choose a fee rate according to priority.
You should therefore set a fee higher than a rate of 1 sathoshi/byte and create an output amount of at least 546 sathoshis, although I am not completely sure about the minimum amount.