Crypto API tutorials and more:

How to connect the Coin Metrics API to Google Sheets

Coin Metrics organizes the world’s crypto data and makes it transparent and accessible. We can use the Coin Metrics API to import data from Coin Metrics into Google Sheets. In this tutorial, we’ll show you how to connect the Coin Metrics REST API to Google Sheets in 4 steps:

  1. Install the Apipheny add-on
  2. Choose a Coin Metrics endpoint
  3. Enter your Coin Metrics API request into Apipheny
  4. Run the Coin Metrics API request in your Google Sheet

Step 1.) Install and open the Apipheny add-on for Google Sheets

Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.

1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install

2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

Step 2.) Choose a Coin Metrics endpoint

In this section, we’ll show you how to browse the Coin Metrics API documentation to find the endpoint that retrieves the data you need from their API. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 3.

First, open the Coin Metrics API documentation page: https://docs.coinmetrics.io/api/v4

The menu on the left contains general information about the Coin Metrics API and a list of categorized endpoints.

The Base and Community APIs are available to all users without an API key. The Pro API does require an API key, which is only obtainable though CM Network Data Pro.

In our tutorial we will access the Community API, with the following HTTP root endpoint URL:

https://community-api.coinmetrics.io/v4
Coin Metrics API documentation page
Coin Metrics API documentation page

If we click the Catalog category, a list of its endpoints will be displayed:

The Catalog category
The Catalog category

An example endpoint is Available assets, which returns a list of available assets, along with information for them, like metrics, markets, exchanges and time ranges of available data:

https://community-api.coinmetrics.io/v4/catalog/assets

The endpoint’s documentation contains a short description of the endpoint’s purpose, its HTTP method (GET), the URI, a list of accepted parameters, request samples and response samples:

Available assets endpoint documentation
Available assets endpoint documentation

Step 3.) Enter your Coin Metrics API request into Apipheny

Once you’ve chosen an endpoint, go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 2, we explained how you can find the Coin Metrics REST API endpoint that you need. Now copy and paste your complete Coin Metrics API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).

For this example, we are using the Available markets endpoint, which returns a list of available markets along with time ranges of available data. This is what the whole URL looks like:

https://community-api.coinmetrics.io/v4/catalog/markets?pretty=true&limit=100

This is what our request looks like in Apipheny:

Coin Metrics API request entered into Apipheny
Coin Metrics API request entered into Apipheny

Step 4.) Run the Coin Metrics API request in your Google Sheet

Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Coin Metrics API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

Coin Metrics data imported into Google Sheets
Coin Metrics data imported into Google Sheets

That’s it! You’ve successfully connected your Coin Metrics account to Google Sheets using the Coin Metrics API and the Apipheny add-on.

After making a successful request to the Coin Metrics API, try querying a different Coin Metrics API endpoint, or try using one of the more advanced features in the Apipheny add-on.


Crypto API tutorials and more:



Crypto API tutorials and more:


API Tutorials



API Knowledge

What is an API?

What is an API URL?

What are parameters?

What is an endpoint?

What is an API key/token?

What is basic authentication?

What are headers?

What is a GET request?

What is a POST request?


Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool

Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website