Import CryptoCompare Data to Google Sheets
CryptoCompare provides streaming pricing data for cryptocurrencies. In this guide, we’ll walk through how to pull cryptocurrency data from the CryptoCompare API directly into Google Sheets, using the API Connector add-on for Sheets. We’ll first get an API key from CryptoCompare, and then set up a request to pull in cryptocurrency exchange rate details to your spreadsheet.
- Part 1: Get your CryptoCompare API Key
- Part 2: Create your API Request URL
- Part 3: Pull API Data into Sheets
- Part 4: CryptoCompare API Notes and Expansions
- If you haven’t already, navigate to https://min-api.cryptocompare.com/pricing and click Get your free key.
- Fill out your details and click Sign Up
- A moment later you’ll receive an email. Click on the email to verify your account, and you’ll land on your new CryptoCurrency dashboard. Click https://www.cryptocompare.com/cryptopian/api-keys to access the API key section of your account.
- Click ‘Create an API key’
- Give your API key a name, it can be anything but here we’ll call it ‘Crypto for Google Sheets’. Select the permissions you’d like, and click Add.
- You’ll now see your API key. Congrats, you now have access to the CryptoCompare API! Copy this and keep it handy, we’ll need it in a moment.
We’ll follow the CryptoCompare documentation to access the current price of BTC (Bitcoin).
- API root: https://min-api.cryptocompare.com
- Endpoint: /data/price
- Query Strings: ?fsym=BTC&tsyms=USD,JPY,EUR
Putting it together, we get the full API Request URL:
We can now enter all our values into API Connector and import CryptoCompare API data into Google Sheets.
- Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
- In the Create Request interface, enter the Request URL we just created
- Under Headers enter a set of key-value pairs like this:
authorization Apikey YOUR_API_KEY
Replace YOUR_API_KEY with the API key you received above in step 6.
- Create a new tab. You can call it whatever you like, but here we’ll call it ‘CryptoCompare’. While still in that tab, click ‘Set’ to use that tab as your data destination.
- Name your request. Again we’ll call it ‘CryptoCompare’
- Click Run and a moment later you’ll see the latest exchange rates for Bitcoin in your Google Sheet:
- Experiment with endpoints and query strings as described in the documentation to see other types of cryptocurrency data. For example, you can see top coins by total volume in the last 24 hours by entering
- If you’re looking for a more dynamic, ticker-like experience, check out the API Connector custom function IMPORTAPI() for faster refresh rates.