Bitcoin address total investment
With this cli you can know if a Bitcoin address is profitable or not.
It goes through each Utxo(a certain amount of cryptocurrency that has been authorized by a sender and is available to be spent by a recipient) of the given address and checks the USD price when the transaction occured.
$ cargo run -- --address=<BTC_ADDRESS> --delay=<OPTIONAL_DELAY_IN_SECONDS>
Due to a limitation on CoinGecko api, if an address has more than 30 utxos, the api will fail with TOO_MANY_REQUESTS
. By adding a delay as env var when running the application, we can mitigate that. This deeply affects the UX, but it's the only option I could think of right now.
$ cargo build
- If an address has more than 30 transactions, CoinGecko api will fail with a
TOO_MANY_REQUESTS
status code. - CoinGecko only has historical price data from May 28th 2013. So if any address has transactions older than that, the app will crash. We can apply a handler for cases like this and assume a USD value of 0(zero) to avoid breaking the program.
I am not a Rust developer myself, so this app could definitely use help 😅