Automate Cryptocurrency Market Data Imports To Google Sheets Using CoinAPI

Reading Time: 4 minutes

CoinAPI is a platform that provides information about cryptocurrency market data. The critical endpoints include Exchange rate data, Trades data, OHLCV data, Orders data, and many more. 

All this can be imported in just a blink of an eye using Amigo Data, a Google Sheets extension that automates data imports. Amigo data saves you from manually retrieving data, set it up once and let Amigo Data do the job for you.

In this tutorial, we will learn how to import data about a particular cryptocurrency. Below are the steps to import cryptocurrency data from CoinAPI into Google Sheets:

Cryptocurrency market data imports to Google Sheets

Install the Amigo Data add-on

Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace. Click here to install.

Amigo Data in Google Workspace Marketplace

Alternatively, you can get it from Google Sheets.

  • Open a new sheet
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo Data and install

Generate API key

Visit coinapi.io and click on the GET A FREE API KEY option

Automate cryptocurrency market data imports to Google Sheets using CoinAPI

Enter your credentials to sign up for a free API key

Enter the details to get free API key

You will receive your API key via e-mail

You will receive API key via e-mail

Get the endpoint of the data to import to Google Sheets

Under the Market Data – Starter Guide, choose Market Data – REST API option

Select the market data option

We have numerous endpoints to import different kinds of data. In this tutorial, we will import current trades data. From the Quotes menu, choose the Current Data option. It will import the data about the current trades that have happened in cryptocurrency market

Select the current data option

On the right side, copy the endpoint URL and note down the header

Copy the endpoint URL

Import the data to Google Sheets

Now to back to Google Sheets and launch Amigo Data by clicking Extensions→Amigo Data→Connect.

Launching Amigo Data in Google Sheets

Then select Custom API from the list of sources.

Selecting the source in Amigo Data

Paste the endpoint URL in the API URL field.

Pasting the endpoint

In the Details tab, add a header. Enter the key and value pairs as follows:

Key: X-CoinAPI-Key

Value: Your API key

Add the API key

Click on the PREVIEW button.

Flatten the data and click on IMPORT 

Click to flatten and import data

In just a matter of seconds, your data will be successfully imported to Google Sheets. Here’s a snippet of imported data

Snippet of imported CoinAPI data

Other types of data can also be imported to Google Sheets in a similar manner.

Exchange rate

It fetches the current market price of any cryptocurrency. The endpoint URL is as follows:

Asset_id_base: It stands for the base cryptocurrency whose market price we wish to determine

Asset_id_quote: It stands for the target currency i.e the value of a base currency expressed in terms of target currency

For example, we wish to find the exchange rate of BTC in terms of USD. The API endpoint URL should look like this:

Similarly, you can also explore other endpoints. CoinAPI has so much to offer. You can import any kind of currency market data using this interface. To explore more endpoints go through the documentation of CoinAPI. 

After importing the data, you can also set a refresh schedule so that the data are updated automatically at regular intervals. By this, you can automate importing financial market data to Google Sheets. To learn how to set a refresh schedule, follow this link.

There are several other types of data that you can import into Google Sheets using Amigo Data such as Marketstack data,  Coinmarketcap data, Nasdaq data, and many more. 

Some related articles you may be interested in:

Get Real-time Stock Data In Google Sheets Using MarketStack API

Import CoinMarketCap Data To Google Sheets

Import Data From Nasdaq To Google Sheets