Excel Import CoinMarketCap API Data with Query - Syntax Byte (2024)

The CoinMarketCap Pro API is a great source for cryptocurrency data on current and historical prices, exchange information and more. If it is your wish to use Excel to import CoinMarketCap API data, and have it updated live, look no further. In this article, I will show you how to use a query to import current prices into Excel and have them updated regularly using the methods shown in the Import JSON Data in Excel article. Be aware that this works best with Excel 2016 or greater, and doesn’t work with Excel for Mac. If you are using Excel 2013 or prior, you will need to install Power Query before attempting these steps.

Getting Current Latest Price Quotes

With the CoinMarketCap API, current quotes are handled by the https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest endpoint. In order for proper data to be returned, a proper API key (sign up on their website) must be passed as a header item and cryptocurrencies to return selected by the id/slug/symbol parameters. For this example, I will use the symbol parameter.

Step 1: Setup the CoinMarketCap Web Request in Excel

To pull the data into Excel, we use a web query. Under the Data tab in the ribbon, select Get Data > From Other Sources > From Web.

Excel Import CoinMarketCap API Data with Query - Syntax Byte (1)

Next, we need to input the URL we want to use and setup our API key as a header item to authenticate with CoinMarketCap. Make sure the Advanced radio button is selected. Enter the API URL you would like to get data from in the top box of URL parts. In this case, I have used https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC,LTC to get the latest prices of BTC and LTC. Then, under HTTP request header parameters type X-CMC_PRO_API_KEY in the dropdown box. Paste your API key from CoinMarketCap in the box beside. Click OK. If you are asked how you would like to authenticate with the website, choose Anonymous. By putting our API key as a header item, we are already setup to authenticate with CoinMarketCap, so no further configuration is necessary.

Excel Import CoinMarketCap API Data with Query - Syntax Byte (2)

Step 2: Create the Tables in the Excel Query Editor

Next, create the right tables using the query editor from the returned data. Because this takes many clicks, please refer to the video below to guide you. The flow is essentially to click into data, we can disregard the status object. Then, convert to table by clicking Into Table as this is already the point we will see the list of quotes. Then, expand the value record by clicking the two arrows on the header and check off anything you are interested in. In this case, I just want the quote so I only expand that and keep expanding records as long as you want to get the data you need. Then, Close & Load.

Step 3: Finished CoinMarketCap Table in Excel and Setup Auto Refresh

Once you click Close & Load in the query editor, you should see the data in Excel as a table.

Excel Import CoinMarketCap API Data with Query - Syntax Byte (3)

At this point, you may wish to setup auto-refresh. To do this, go into Connection Properties under Refresh All. Make sure your cursor is on a cell in the table if the Connection Properties button is greyed out.

Excel Import CoinMarketCap API Data with Query - Syntax Byte (4)

Then, you can configure auto-refresh in the properties by checking the “Refresh every” box and setting the frequency. You can also choose to have the data updated every time the file is opened. Keep in mind that on the Basic plan, CoinMarketCap only allows 300 requests per day so refreshing more often isn’t necessarily better if you don’t require frequent refreshes for your purposes.

Excel Import CoinMarketCap API Data with Query - Syntax Byte (5)

That’s it!

Excel Import CoinMarketCap API Data with Query - Syntax Byte (2024)

FAQs

How do I extract data from CoinMarketCap to Excel? ›

To pull the data into Excel, we use a web query. Under the Data tab in the ribbon, select Get Data > From Other Sources > From Web. Next, we need to input the URL we want to use and setup our API key as a header item to authenticate with CoinMarketCap. Make sure the Advanced radio button is selected.

How do I import API data into Excel? ›

Import the API data as XML
  1. In Microsoft Excel, select the File tab, then go to Options > Customize Ribbon.
  2. In the Customize the Ribbon drop-down menu select Main Tabs.
  3. Select the Developer check box then OK to apply.

How do I use coin caps in Excel API? ›

From the data ribbon, select From Web which can be found in the Get and Transform group of commands. This will open a From Web setup box. In the HTTP request header parameters(optional) second box enter your API Key and press OK. Excel will connect to the API and open up the Power Query window.

How to connect Excel to CoinMarketCap API for up to date cryptocurrency pricing? ›

Step 1: Connect to https://api.coinmarketcap.com/v1/ticker/ from the Web Option in the Data ribbon in Excel. Step 2: The Power query editor will open with the data contained within a List. Convert this list to a Table. Step 3: The table will contain one column, each cell containing a Record.

How do I scrape data from CoinMarketCap? ›

  1. coinmarketcap-scraper. Python-based scraper for market cap, supply, exchange price, and exchange volume data from coinmarketcap.com.
  2. Installation. Make sure required python packages are installed. pip install cssselect lxml psycopg2 requests.
  3. Usage. Simply run $ python scrape.py to scrape all currencies on coinmarketcap.

How do I get API from CoinMarketCap? ›

You can sign up at pro.coinmarketcap.com - This is our live production environment with the latest market data. Select the free Basic plan if it meets your needs or upgrade to a paid tier. Copy your API Key. Once you sign up you'll land on your Developer Portal account dashboard.

How do I query an API in Excel? ›

Accessing the Results API using Excel
  1. Open Microsoft Excel.
  2. Click the Data tab in the ribbon.
  3. From the From Other Sources drop-down list, select the From OData Data Feed option. ...
  4. In the Link or File field, enter the URL of the Results API service for the Questionmark account you want to access.

How do I get JSON data from API in Excel? ›

How to pull JSON data to Excel
  1. Select JSON as a source app. ...
  2. Specify the JSON URL to import data from. ...
  3. Configure the connection to the JSON API and the query using the optional parameters. ...
  4. Select Excel as a source app, connect your Microsoft account, and select the workbook and worksheet to pull JSON data to.

Can Excel interact with an API? ›

Basically, you have three options to link API to Excel: Power Query: You can query data from APIs using Excel's built-in tool. Coupler.io: This third-party importer will let you automate data exports via APIs to Excel on a custom schedule. VBA: This is a code-based option that is suitable for tech-savvy Excel users.

How do I create a cap formula in Excel? ›

Type =PROPER(A2), and press Enter. Tip: Use the formula =UPPER(A1) for all UPPERCASE; =LOWER(A1) for all lowercase.

Can Excel pull in crypto prices? ›

Once you've set up the API, it becomes a breeze to pull crypto prices and data into Excel, in just a matter of seconds.

How do I import live crypto prices into Excel CoinGecko? ›

Let's get started!
  1. Step 1: Get these tabs open before the mapping exercise. ...
  2. Step 2: Pulling list of coins from CoinGecko's API. ...
  3. Step 3: Convert the data into Table format on Power Query Tab. ...
  4. Step 4: Close and Load your data to the excel spreadsheet.
Aug 19, 2021

How do I get historical crypto data in Excel? ›

Using templates
  1. From the Cryptosheets Excel ribbon click templates OR click on the templates tab in the browse section.
  2. Load the template called Query Builder and type Cointracking and Get Historical Summary.
  3. You can also try searching "Cointracking..." for other templates.

How do I get data from CoinGecko API? ›

Go to https://www.coingecko.com/en/api and scroll about halfway down. There, you'll see the types of requests you can make. Since my application needs to bring in some data from CoinGecko, I want to make a GET request. That's exactly what CoinGecko enables.

Can I web scrape CoinMarketCap? ›

If you are an investor, web scraping CoinMarketCap can be your first step towards success. Web scraping automates the process of extracting data from CoinMarketCap and stores the data in a structured format for further analysis. It allows you to keep your head in the game and stay ahead in the market.

How do I pull CoinMarketCap data into Google Sheets? ›

Import CoinMarketCap Data to Google Sheets
  1. Contents.
  2. Before You Begin.
  3. Part 1: Get Your CoinMarketCap API Key.
  4. Part 2: Pull Data from CoinMarketCap into Sheets.
  5. Part 3: Create a Custom Request.
  6. Part 4: Handle Pagination.
  7. Part 5: API Documentation.
  8. Appendix: CoinMarketCap Template.

How do I import CoinGecko API? ›

Part 2: Pull CoinGecko API Data into Sheets
  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create tab, enter the API URL we just created.
  3. Leave the Headers section empty. ...
  4. Create a new tab and click Set current to use that tab as your data destination.
  5. Name your request and click Run.
Jul 21, 2022

How do I pull data from CoinGecko to Excel? ›

Let's get started!
  1. Step 1: Get these tabs open before the mapping exercise. ...
  2. Step 2: Pulling list of coins from CoinGecko's API. ...
  3. Step 3: Convert the data into Table format on Power Query Tab. ...
  4. Step 4: Close and Load your data to the excel spreadsheet.
Aug 19, 2021

How do I take CoinMarketCap prices to Google Sheets? ›

CoinMarketCap API and Google Sheets
  1. Go to CoinMarketCap account and sign up or log in.
  2. Click the button that says “GET YOUR API KEY NOW”.
  3. Fill in the sign up API form.
  4. Go to your email. ...
  5. After clicking you will get sent to your API dashboard. ...
  6. In a new tab, go to this Google Sheet I created and make a copy.
Aug 24, 2021

Top Articles
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 5744

Rating: 4.3 / 5 (74 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.