Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input and output for estimate_tx_fee() function #150

Open
Freditansari opened this issue Jul 13, 2021 · 1 comment
Open

input and output for estimate_tx_fee() function #150

Freditansari opened this issue Jul 13, 2021 · 1 comment

Comments

@Freditansari
Copy link

How do I find the input and output for the estimate_tx_fee() function?

@reza-khalafi
Copy link

reza-khalafi commented May 24, 2023

@Freditansari Did you find any usefull answer? I need to estimate transaction fee before key.send() or key.create_transaction(). I have find this formula:

Get fee_rate from here:

https://bitcoinfees.earn.com/api/v1/fees/recommended 
=> {"fastestFee":102,"halfHourFee":102,"hourFee":88}

Then:

transaction_size_as_byte = (number_of_inputs * 180) + (number_of_output * 34)
transaction_fee = transaction_size_as_byte * fee_rate

And i don't know how to get number_of_inputs and number_of_output.

Let me know if you have any solution for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants