Code does not account for bridged ETH which can result in a negative balance if ETH is bridged out. Or a substantially overestimated balance if ETH is bridged in to the account. Since the vast majority of wallets have never bridged ETH, this is unlikely to effect the analysis.
- Get api keys from .env and enter wallet address you want to analyse
- Call two api endpoints
- Get account balance
- Get a list of all transactions by address
- Calculate value of ETH transferred to and from address
- Calculate ETH spent on gas for each transaction
- Take external, internal and gas expenditure into account to calculate balance over time
- Calculate max, min and avg balance plus they days they occured on.
- Allow ENS entry as well as 0x address entry using the INFURA api
- Customise matplotlib chart
- Create chart (Balance vs time) with matplotlib
- Host it all on streamlit, allowing the end user to enter an ethereum address