In this tutorial, we’ll learn how to import CoinMarketCap data to Google Sheets step by step using CoinMarketCap API and automatically update the imported data in Google Sheets.
In the snippet shown below, we have a list of cryptocurrencies imported into Google Sheets using CoinMarketCap API.
Steps to import CoinMarketCap data into Google Sheets using CoinMarketCap API.
- Install Amigo Data Google Sheets extension
- Get the CoinMarketCap API key
- Choose a CoinMarketCap API endpoint
- Import the data to Google Sheets
How to import CoinMarketCap data to Google Sheets
A step-by-step guide on how to import CoinMarketCap data to Google Sheets.
Step 1: Install the Amigo Data add-on in Google Sheets
Amigo Data is a data integration and automation tool that allows us to retrieve data from various sources and pull the data to Google Sheets. And not only that, it automatically updates the data at regular intervals.
Install the Amigo Data add-on so that we can import CoinMarketCap data to Google Sheets.
Step 2: Get the CoinMarketCap API key
Follow the steps below to get the CoinMarketCap API key.
Go to the CoinMarktetCap developer portal.
Click GET YOUR API KEY NOW.
Enter the details and click CREATE MY ACCOUNT.
Enter the email verification code and click CONFIRM SIGNUP.
Or simply click the verification link sent to your email address.
Upon confirmation, you’ll be taken to the account dashboard overview where your CoinMarketCap API key can be found.
Hover the cursor over the asterisks and copy the CoinMarketCap API key. We’ll use the key to retrieve data from CoinMarketCap and pull cryptocurrency data to Google Sheets.
Step 3: Choose a CoinMarketCap API endpoint
Click API DOCUMENTATION to go to the CoinMarketCap API documentation.
Click on any of the high-level categories for individual endpoints. Let us use the EXCHANGE endpoint to import CoinMarketCap data to Google Sheets.
Then click the Latest listings option to get the endpoint for the list of all cryptocurrencies with the latest aggregate market data.
The CoinMarketCap API endpoint URL for the selected data can be found on the right side of the API documentation.
Click on the endpoint to get the complete endpoint URL. “GET” is the API request method.
The Server URL is the default endpoint URL. This will return 100 results with the prices quoted in the US dollar.
To retrieve more than 100 results and in another currency, we can specify it in the URL or in the Amigo Data connector. Ex. To return 5000 results (the max that CoinMarketCap allows), modify the endpoint URL to the following.
To add other further modify the endpoint URL, we need only append the name of the query parameter name followed by the equal sign and the value separating each query parameter by an ampersand (&).
The query parameter names and the values for the selected CoinMarketCap API endpoint can be found under PARAMETERS.
Example: To get 5000 coins sorted by “exchange score” in Indian rupee, the endpoint URL will be as given below.
Step 4: Import the data to Google Sheets
Launch Amigo Data to retrieve the cryptocurrency data and pull the data from CoinMarketCap to Google Sheets.
Select Custom API.
Paste the CoinMarketCap API endpoint URL in the API URL bar.
Expand the Details tab and enter the following as a header.
Name: X-CMC_PRO_API_KEY Value: your_api_key
Click PREVIEW to retrieve the cryptocurrency data and preview the CoinMarketCap data to import to Google Sheets.
Flatten and expand the nested datated and click IMPORT.
The data from CoinMarketCap will be imported into Google Sheets in a few seconds.
You can then visualise the data so that you can minutely track the changes and gain better insight. The visualised data are automatically updated based on the imported raw data–by setting a refresh schedule.
The metadata endpoint returns all static metadata such as launch date, logo, official website URL, market fee documentation, and so on.
The historical quote returns an interval of historical quotes of any exchange based on time and interval parameters.
Quotes latest: This endpoint returns the latest global cryptocurrency market metrics.
Historical quotes: This endpoint returns an interval of historical global cryptocurrency market metrics based on time and interval parameters.
For more endpoints and other information on the API, check the CoinMarketCap API documentation.
Automatically pull CoinMarketCap data to Google Sheets
To get the CoinMarketCap data automatically updated at regular intervals so that you don’t have to make a new import each time you want to have fresh data, you can set a refresh schedule.
Set the time for auto-update and specify the update frequency–hourly, daily, weekly, or on certain days. Then click Yes, set the refresh timing.
You can also set the refresh schedule later.
Click View Reports→Select the report→Refresh schedule→Edit→Save & Run.
Alerts via email or Slack
You can get the report sent to your email or a Slack channel so that you do not even have to open the spreadsheet to keep track of what’s happening.
To set up an alert, click Get Alerts→Add alert data+. Edit the details and click Set Alert.
Using Amigo Data, we can easily import CoinMarketCap data to Google Sheets. And not only import but get them updated regularly and get alerted so that we can keep track of any changes and trends–from anywhere, anytime. If you are a data wonk, then Amigo Data can be your faithful companion. You can use it to import data from several sources into Google Sheets.
There are several sources from which you can pull data into Google Sheets using Amigo Data. Visit our blog to learn more.
Here are some similar articles you may be interested in:
Import Yahoo Finance data to Google Sheets
Import CoinGecko data to Google Sheets