blockcypher / blockcypher-python

Python library for the BlockCypher web services
https://www.blockcypher.com/dev/bitcoin
Apache License 2.0
215 stars 123 forks source link

Simple spend transaction fee #122

Open haysquareA opened 1 year ago

haysquareA commented 1 year ago

Hello there Please I would like to know how to use my own transaction fee using simple spend api, send from BTC wallet address to another wallet address Note: I'm already using simple send to transact but the transaction fee is too high . Thanks in advance

frier17 commented 1 year ago

Hi. The default transaction fee for simple_spend uses a 'high' value (this allow for transactions to be confirmed faster). I worked on your issue and will be adding it as a Pull Request. The changes I made allows for a preference parameter for the simple_spend to be called with 'low', 'medium', 'zero' or 'high' values. This will allow users to select their preferred fees. The 'zero' option though theoretically allowed may lead to transactions not being added. I consider it impractical for commercial uses but okay for testing purposes only - I may be wrong. However, if you want fine grained control you will need to generate your transaction, sign your transactions, and broadcast it as shown in the blockcypher documentation