Import CoinGecko Data to Google Sheets

CoinGecko is a cryptocurrency ranking website for tracking the activity of cryptocurrencies and exchanges. In this guide, we’ll walk through how to pull cryptocurrency market data from the CoinGecko API directly into Google Sheets, using the API Connector add-on for Sheets. This is a free, open API so we won’t need any API key.

For a quick start, skip directly to the Appendix and get the template.

PART 1: CREATE YOUR COINGECKO API REQUEST URL

We’ll first follow the CoinGecko API documentation to access the current price of ETH (Ethereum).

  • API root: https://api.coingecko.com
  • Endpoint: /api/v3/coins/markets
  • Query String: ?vs_currency={currency}&ids={coin ID}
    Query String Example: ?vs_currency=usd&ids=ethereum

Putting it together, we get the full API Request URL:

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=ethereum

PART 2: PULL COINGECKO API DATA INTO SHEETS

We can now enter all our values into API Connector and import CoinGecko API data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
  2. In the Create Request interface, enter the Request URL we just created.
    coingecko-img1
  3. Leave the Headers section empty. This API is open and public, so we don’t need any authentication. We can skip the Authentication section, too.
  4. Create a new tab and click ‘Set current’ to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see the latest exchange rate data for Ethereum to USD appear in your Google Sheet:
    coingecko-img2

PART 3: MORE EXAMPLE API URLS

Experiment with endpoints and query strings as described in the documentation to see other types of currency and crypto data from the API. For example, you can try the following URLs, one at a time:

  • https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd
  • https://api.coingecko.com/api/v3/coins/list
  • https://api.coingecko.com/api/v3/coins/bitcoin/tickers
  • https://api.coingecko.com/api/v3/exchanges
  • https://api.coingecko.com/api/v3/exchanges?view=cybersecurity
For a more dynamic, ticker-like experience in Sheets, check out the API Connector custom function IMPORTAPI().

APPENDIX: GET COINGECKO EXCHANGE DATA TEMPLATE

This template contains some basic data from top exchanges on CoinGecko. All of the requests are already configured, so you can just skip all of the previous steps and go directly to this sheet, no API key or credentials required!

coingecko-img3

You can jump right to a copy of the template here. Happy data grabbing!

Leave a Comment