CoinMarketCap
How do I import CoinMarketCap data to Google Sheets?#
CoinMarketCap describes their API as follows: "The CoinMarketCap API is our enterprise-grade cryptocurrency API for all crypto data use cases from personal, academic, to commercial. The API is a suite of high-performance RESTful JSON endpoints that allow application developers, data scientists, and enterprise business platforms to tap into the latest raw and derived cryptocurrency and exchange market data as well as years of historical data. This is the same data that powers coinmarketcap.com which has been opened up for your use cases." In this guide, I'll walk you through how to import data from CoinMarketCap into Google Sheets.
BEFORE YOU BEGIN
If you haven't already, install the Data Connector Add-on for Google Sheets from the Google Workspace Marketplace
Step 1: Create your API Request
- Open Google Sheets and click
Add-ons -> Data Connector -> Manage Connections - Click
NEW COMMAND - Name your command. In this case, we will name it
coinmarketcap - Select
APIfor the Type - Select
GETfor the Method - Enter
https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?convert=USD&symbol=BTCin the URL field. - Enter
X-CMC_PRO_API_KEYfor a Header key and+++1+++for the Header value - Enter
Acceptfor another Header key andapplication/jsonfor the Header value - Select
JMESPathfor the Filter type - Enter
data.BTC.quote.USD.pricein the expression box. - Click
SAVE
Step 2: Run the command
- Now, you can run your command:
=run("coinmarketcap", B1), where cellB1has your CoinMarketCap API Key