James Bachini

Python

  • Calculating CAGR in Python & JavaScript

    Calculating CAGR in Python & JavaScript

    The Compound Annual Growth Rate (CAGR) is a useful measure for assessing the mean annual growth rate of an investment or business metric over a specified period longer than one year. Unlike other growth metrics, CAGR smooths out the volatility, providing a clearer picture of how investments grow over time. In this guide, I’ll show…

  • How To Check Token Balances Using Python

    How To Check Token Balances Using Python

    To check a wallet token balance on the Ethereum blockchain using Python you will need the following: Once we have our API key ready and Python installed we can install web3.py using the following command Now let’s create a file called balance.py and add the following code. Note the code is also available in the…

  • How To Lookup An ENS Name In Python

    How To Lookup An ENS Name In Python

    To check a wallet token balance on the Ethereum blockchain using Python you will need the following: Once we have our API key ready and Python installed we can install web3.py using the following command Now let’s create a file called enslookup.py and add the following code. Enter your Infura API key on line 5.…

  • Building A Portfolio Tracker In Python

    Building A Portfolio Tracker In Python

    In this tutorial we will be building a digital asset portfolio tracking tool using python and the Coinbase API. You’ll need to install python and the following library to make requests. The code for this is open source on Github at: https://github.com/jamesbachini/Python-Portfolio-Tracker Put this in a file called portfolio.py or fork the repo above. Then…