How do I track crypto in Google Sheets?

This automation is serverless and uses the CoinMarketCap Free Tier API

How do I track crypto in Google Sheets?
Image by author

Hey there, I wrote this guide because similar to many crypto holders, I was spending too much time copying and pasting crypto price data manually into my Google Sheet portfolio trackers. I figured someone must have automated this by now, right?

At first, I tried looking online but I couldnt find anything that was easy to set up, and I didnt want to pay for premium features on a Spreadsheet Addon.

So, I did what any spreadsheet nerd would do: I coded a solution using some Google Apps wizardry and the Free Tier API from CoinMarketCapand voila, you can see my proof of concepts below:

How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
How do I track crypto in Google Sheets?
For ease of use, I added example formulas in the Example Usage tab in the Top 5000 Coins spreadsheet

Your trading journal probably works differently than mine, so Ill end here, but hopefully you get the idea.

12) Schedule your code to run by itself

You can use time or action-based Google Apps Triggers to have this automatically refresh your sheet with live data. Just be sure to not go over the Free API limit of 333 calls per month.

13) Customizing the Script to retrieve other data (Optional)

Ill end here, but Ive included in the github repo another place where you can customize the API results, called parameters. Customizing your API results is documented in the https://coinmarketcap.com/api/documentation/v1/.

That said, if you make changes to the parameters, be prepared to change the rest of the script, in particular, changing the fields returned in Lines 40 and how they get mapped back to the Google Sheet: