Import CoinMarketCap Data To Google Sheets

How to import CoinMarketCap data to Google Sheets
Reading Time: 5 minutes

In this tutorial, we’ll learn how to import CoinMarketCap data into Google Sheets step by step.

  1. Install Amigo Data Google Sheets extension
  2. Get CoinMarketCap API key
  3. Choose an endpoint
  4. Import the data to Google Sheets

How to import CoinMarketCap data to Google Sheets

Step 1: Install the Amigo Data add-on in Google Sheets

Install the Amigo Data add-on so that we can import CoinMarketCap data to Google Sheets.

You can get it from Google Workspace Marketspace. Here’s the installation link: https://workspace.google.com/marketplace/app/amigo_data/274781802717

Step 2: Get the CoinMarketCap API key

Follow the steps below to get the API key.

Click GET YOUR API KEY NOW

Generating a key on CoinMarketCap

Enter the details and click CREATE MY ACCOUNT

Creating an app

Enter the email verification code and click CONFIRM SIGNUP

Verifying email id and confirming signing up

Or simply click the verification link sent to your email address.

Upon confirmation, you’ll be taken to the account dashboard overview where the key can be found.

Hover the cursor over the asterisks and copy the key.

The API key

Step 3: Choose an endpoint

Click API DOCUMENTATION

API documentation link

Click on any of the high-level categories for individual endpoints. Let us select EXCHANGE.

List of available endpoints

Then click the Latest listings option to get the endpoint for the list of all cryptocurrencies with the latest aggregate market data.

List of endpoints within the exchange category

Click on the endpoint on the right of the screen to get the full endpoint URL.

Getting the endpoint

The Server URL is the default endpoint URL. This will return 100 results with the price quoted in US dollar.

The endpoint URL

To return 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), we need to modify the endpoint URL to

https://pro-api.coinmarketcap.com/v1/exchange/listings/latest?limit=5000

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 can be found under PARAMETERS.

Query parameters and their values

Example: To get 500 coins sorted by “exchange score” in Indian rupee, the endpoint URL will be as given below.

https://pro-api.coinmarketcap.com/v1/exchange/listings/latest?limit=5000&sort=exchange_score&convert=INR

Step 4: Import the data to Google Sheets

To import CoinMarketCap API data to Google Sheets, open Amigo Data from Google Sheets.

Launching Amigo Data

Select Custom API

List of sources to that can be connected in Amigo Data

Paste the endpoint URL in the API URL bar

Paste the endpoint in Amigo Data

Expand the Details tab and enter the following as a header.

Name: X-CMC_PRO_API_KEY Value: your_api_key

Enter the key as header

Click PREVIEW

Preview the data

Flatten the data and click IMPORT. The data from CoinMarketCap will be imported into Google Sheets in a few seconds.

Snippet of the imported data

You can then visualise the data so that you can minutely track the changes and gain better insight. The visualised data is automatically updated based on the raw data that were imported–by setting a refresh schedule.

Visualisation of the imported data for better insights

Other endpoints

Metadata

The metadata endpoint returns all static metadata such as launch date, logo, official website URL, market fee documentation, and so on.

https://pro-api.coinmarketcap.com/v1/exchange/info

Historical Quotes

The historical quote returns an interval of historical quotes of any exchange based on time and interval parameters.

https://pro-api.coinmarketcap.com/v1/exchange/quotes/historical

Global Metrics

Quotes latest:  This endpoint returns the latest global cryptocurrency market metrics.

https://pro-api.coinmarketcap.com/v1/global-metrics/quotes/latest

Historical quotes: This endpoint returns an interval of historical global cryptocurrency market metrics based on time and interval parameters.

https://pro-api.coinmarketcap.com/v1/global-metrics/quotes/historical

For more endpoints and other information on the API, check the CoinMarketCap API documentation.

Setting refresh schedule

To get the information updated periodically, select the refresh schedule–hourly, daily, weekly, or on certain days.

Then click Yes, set the refresh timing.

Setting refresh schedule

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.

Setting up alert

Conclusion

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 a data wonk, then Amigo Data can be your faithful companion. You can use it to import data from several sources into Google Sheets.

See also

Here are some similar articles you may be interested in:

https://blog.tryamigo.com/import-yahoo-finance-data-into-google-sheets/

https://blog.tryamigo.com/import-coingecko-data-to-google-sheets/

https://blog.tryamigo.com/import-coinbase-data-to-google-sheets/

https://blog.tryamigo.com/how-to-import-nasa-data-to-google-sheets/