How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (2024)

In this tutorial, learn how to leverage CoinGecko APIand Microsoft Excel to:

  1. Set up a directory of coin ids and symbols
  2. Import and track live crypto prices
  3. Get real-time crypto prices for trading pairs
  4. Get historical prices for specific cryptocurrencies
  5. Fetch total crypto market cap data
  6. Pull price data for trending crypto categories

Additionally, we’ll cover how to refresh the data in your Excel workbook, address common errors and how you can overcome rate limits.

Let’s dive in!

Note: This guide is prepared using the Microsoft 365 version of Excel, for Excel users operating on Windows instead of Mac OS. Power Query is included in Excel versions higher than 2010, however only 2016 versions onwards and Microsoft 365 are actively updated by Microsoft. In newer versions, Power Query capabilities are integrated within the Data tab. If this feature is not available in your version of Excel, download it for free on Microsoft.

How to Import a List of Coin IDs & Symbols into Excel

You can import a list of coin ids and symbols into Excel with theCoinGecko API/coins/listendpoint. This is a fundamental step as it serves as a navigational guide to reference coin ids, forfuture API calls that require ids to be specifiedin its parameter.

To start, head over to the CoinGecko API documentation and find the /coins/list endpoint.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (1)

If you are using our freeDemo plan, remember to toggle the documentation to v3.0.1. If you are onthe Pro (Paid) API plans, be sure to reference v3.1.1.

This endpoint will return a full list of active coins on CoinGecko and its respective ‘id’, which identifies all crypto assets listed.

💡 Pro-tip: Along with /coins/list, these are navigational endpoints in the API, which helps you to discover and navigate the data retrieval process.

  • /exchanges/list
  • /derivatives/exchanges/list
  • /nfts/list
  • /search
  • /search/trending
  • /coins/list/new

Add in your API key and click 'Try It'.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (2)

Copy the URLand navigate toyour new Excel workbook –Data > Data from Web.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (3)

Upon clicking Data from Web, a ‘From Web’ dialog box will appear.

If you’re on our Demo API plan, stay on the Basic toggle and paste the URL accordingly. Depending on the current global call usage, it may take a while to establish a connection.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (4)

💡 Pro-tip: If you plan to use CoinGecko API extensively and have mission-critical analysis work, we recommend subscribing to our Analyst API Plan at only $103/month (annual subscription).

If you are a paid API subscriber and have a pro API key, you can connect the API in two ways:

  1. In the same Basic dialog box, paste the Request URL with the root URL updated to the pro API version, and append your API key at the end. Essentially, it should appear as:

  2. Toggle to the ‘Advanced’ option, and paste the Request URL with the updated pro API root URL in the ‘URL parts’ field. Additionally, in the HTTP Request Header Parameters section, fill in ‘x-cg-pro-api-key’ and input your pro API key accordingly.

    How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (5)

Both ways work well, and is just a matter of personal preference. Once the connection is established, a new Power Query Editor window appears with a column of records.

Select ‘To Table’ at the top left corner of the window. You may encounter a pop-up asking for a delimiter to split the table.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (6)

Next, expand the table.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (7)

The Records are now expanded into their respective columns. You may choose to rename the columns accordingly (in our example, we’ve renamed columns to ‘id’, ‘symbol’ and ‘name’ respectively. Finally click on ‘Close & Load’ on the top left.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (8)

That’s it! Now you have a list of active cryptocurrencies on CoinGecko, with its respective coin id, symbol and names - this will come in handy for future API calls.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (9)

How to Import Trending Crypto Price Data into Excel

The quickest way to fetch trending crypto price data into Excel is using CoinGecko API’s Trending Searchendpoint, through Excel’s Data from Web feature. This will import price data on the top 7 trending coins on CoinGecko, as searched by users in the last 24 hours.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (10)

Similarly, copy the Request URL and follow the steps in the previous section to connect the endpoint to Excel’s Power Query Editor. In this example, the Request URL is: https://api.coingecko.com/api/v3/search/trending.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (11)

Upon closing and loading the table, you’ll find the top 7 trending cryptocurrencies and its respective data in the spreadsheet.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (12)

Format the data based on your preferences. Now you can easily reference the top 7 trending cryptocurrencies on CoinGecko, directly on Excel!

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (13)

How to Get Data on Cryptocurrency Trading Pairs in Excel

Get all trading pairs (tickers) for a specified cryptocurrency on CoinGecko, with the Coin Tickers by ID endpoint.

Referencing our coins list in the first section of this guide, we identify that the id for Ethereum is ‘ethereum’.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (14)

On the API documentation playground,fill in the following parameters:

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (15)

Retrieve the Request URL once again, which should be:

Connect it using Excel’s Data from Web feature and you’ll see a table with just one set of data. Double click on ‘List’ to expand it into a list of records.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (16)

As every record contains a nested data set for each trading pair on Ethereum, you will need to convert this into a table. Click on the ‘List’ column header, and then select the ‘To Table’ button at the top left corner.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (17)

Expand the columns accordingly, checking the data points you’d like to retrieve.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (18)

After expanding the columns in the main table, you will find that some columns (like market, converted_last and converted_volume etc.) may additionally contain nested data. Depending on preference, you can expand this accordingly or keep it as is.How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (19)

When expanding converted_last and converted_volume, uncheck ‘eth’ since this is already our base currency.

After expanding all data points, close and load the Power Query Editor - you have successfully imported all ETH cryptocurrency pairs into your spreadsheet!

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (20)

What Are Cryptocurrency Trading Pairs?

Trading pairs, also known as cryptocurrency pairs, are assets that can be traded for each other or swapped, on an exchange. A trading pair is used to compare the value of one cryptocurrency against another – essentially, how much of the base currency is needed to buy one unit of the quoted cryptocurrency.

How to Get Historical Crypto Prices into Excel

To download historical cryptocurrency prices into Excel, use the Coin Historical Chart Data by ID endpoint on CoinGecko API. This will derive historical market data through April 2013, and include price, market cap and 24 hour volume for a specific coin.

In this example, we will be pulling out the maximum historical data for Bitcoin (BTC).Navigate to the API documentation playground, find the /coins/{id}/market_chart endpoint, fill in the following parameters and execute the query.

  • id: bitcoin
  • vs_currency: usd
  • days: max
  • interval: daily
  • precision: full

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (21)

Update: As of February 2024, access to historical data via the Demo API public planisrestricted to the past 365 days. To access the complete range of historical data, please subscribe to one of ourpaid plansto obtain a ProAPI key.

Once again, copy and paste the Request URL into Excel’s Power Query Editor. Similar to previous steps, convert the source data into a table. However, this time instead of expanding the list of values to new rows, select ‘Extract Values’ instead.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (22)

A dialog box appears, select ‘Comma’ as the delimiter and click on the ‘OK’ button.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (23)

Two strings of values are now extracted within the Value column, separated by the comma delimiter. The first value in each cell is the timestamp in the UNIX epoch format. The second value is Bitcoin’s price in USD.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (24)

In order to have timestamp in one column and price in another, right click on the ‘Value’ header cell and select Split Column > By Delimiter.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (25)

Columns are now split. In this example we’ve renamed the columns accordingly for clarity.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (26)

Close and load the data. In your actual workbook, you’ll now see a table with the following rows: Name (prices, market cap and total volume), Unix TImestamp and Price USD.

Convert the UNIX epoch timestamp to a human-readable date with the formula ‘=(CELL/86400)+DATE(1970,1,1)’.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (27)

Since data for price, market cap and total volume are appended in the same table, create a pivot table using the current data set to show a clearer view of daily historical crypto price, market cap and volume data.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (28)

💡 Pro-tip: Depending on your needs, you can get historical data of cryptocurrencies with any of these endpoints:

  • /coins/{id}/history: Get the coin price and market data on a specific day in the past (00:00 UTC).
  • /coins/{id}/market_chart: Get the historical coin price and market data, X days before today.
  • /coins/{id}/market_chart/range: Get historical coin price and market data for a specified date range.
  • /coins/{id}/contract/{contract_address}/market_chart: Get historical coin price and market data with a contract address.
  • /coins/{id}/contract/{contract_address}/market_chart: Get historical coin price and market data with a contract address for a specified date range.

How to Fetch Total Crypto Market Cap Data in Excel

You can call the Crypto Global Market Data endpoint in CoinGecko API to get real-time total crypto market cap data in Excel. For historical global market cap and volume data, use theGlobal Market Chart endpoint.

In this demo, we’ll be using the latter – note that this is accessible via the paid API plan.

As indicated in the documentation, data granularity for the ‘days’ parameter is automatically set based on the number of days.

  • 1 day from now = data granularity is at hourly intervals
  • 2 days and above = data granularity is at daily intervals, at 00:00 UTC

To pull the last 30 days of data, let’s specify the parameters in the Request URL where ‘days=30’.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (29)

💡 Pro-tip: The default currency for this query is USD. However, you can specify a currency of choice in the optional parameter ‘vs_currency=SGD’ for instance.

Convert the data to table and expand the values accordingly.

As we’ll only be looking at retrieving market cap data, let’s remove the volume column to avoid confusion. The Power Query Editor should appear as such:

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (30)

Extract the values and select a comma delimiter for concatenating values.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (31)

Concatenated values are now shown in the ‘market_cap’ column. The first value is the timestamp in UNIX epoch format, and the second value is the total market cap on its corresponding day.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (32)

Next, split the ‘market_cap’ column by the comma delimiter. You will now have timestamp values in the middle column, and market cap values in the right-most column.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (33)

Rename the columns for clarity. We’ll also remove the first column ‘Name’.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (34)

Finally, save and close the Power Query Editor, and find your clean data in your Excel workbook.

Insert a new column to convert the UNIX epoch timestamp to a human-readable format, with the formula ‘=(CELL/86400)+DATE(1970,1,1)’. Format other columns accordingly.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (35)

💡 Pro-tip: To change the number of days of data being pulled, head to Data > Query & Connections and update the number of days within the Request URL.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (36)

How to Pull Price Data for Trending Crypto Categories

To get live data for trending crypto categories, use the CoinGecko API endpoint /categories. This will import market cap, volume and respective 24 hour percentage change, as well as the top 3 coins, for each category – this can be useful to see which category or ecosystem is gaining traction.

Similar to previous steps, run the Request URL in Excel’s Power Query Editor. Convert the data into a table and expand the columns accordingly. Note to extract the values for the nested List in the ‘top_3_coins’ column, and splitting its columns thereafter.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (37)

Format the cells accordingly. With that, you now have real-time data of trending crypto categories in your Excel workbook!

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (38)

Refreshing the Data

As with most databases, you can choose to refresh the data manually or automatically.

Manual Refresh

To refresh all connected queries in the worksheet, go toData > Refresh All (orange)in your toolbar. Tomanually refresh specific queries, go to Data > Queries & Connections (blue).

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (39)

A right panel will appear, click on theRefresh icon to refresh the corresponding query.Doing this can conserve the number of API calls made, especially if you are on the Public or lower-tiered API plan.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (40)

Automatic Refresh

To set up automatic refresh, navigate to Data > Queries & Connections. Right click and select Properties.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (41)

This prompts the followingdialog box, where you can toggle your preferred refresh frequency:

  • Enable background refresh
  • Refresh every X minute
  • Refresh data when opening the file
  • Refresh this connection on Refresh All

This will need to be set up for each query individually, as there is no other way to adjust the settings globally.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (42)

View Last Updated Status

You can view when the query was last updated by hovering on each query.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (43)

Troubleshooting Tips

API Key Error

You may run into the following error when using the Advanced Data from Web feature.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (44)

Perform relevant checks to verify that your Paid API key and header names are in order. If the error persists, there may simply be a clash among the multiple queries in the worksheet. To solve this, ensure that your API key is applicable on the main root URL https://pro-api.coingecko.com/api/v3, instead of https://pro-api.coingecko.com/api/v3/search/trending for instance.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (45)

Getting Rate Limited

Another issue you may encounter is getting rate limited. While there areno error prompts, you may experience timeout or a perpetually connecting dialog box.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (46)

Signing up for our Paid CoinGecko API can solve this issue – and enable you to focus on analyzing the data rather than troubleshooting sheet errors.

If a consideration for subscribing is running into unexpected overages, setting up a call consumption alert via your developer dashboard can help avoid overages.

Advanced traders who want access to more API endpoints, historical prices and avoid getting rate limited, may consider subscribing to ourAnalyst API plan. The CoinGecko API currently has 70+ endpoints, tracks 2M+ coins across 1,000+ exchanges on 145 networks, and serves billions of API calls each month.

Looking for further API resources for Excel? Check out this tutorial that covers how to import crypto and stock prices into Excel.

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API (2024)

FAQs

How to Import Live Crypto Prices into Excel Spreadsheets | CoinGecko API? ›

The quickest way to fetch trending crypto price data into Excel is using CoinGecko API's Trending Search endpoint, through Excel's Data from Web feature. This will import price data on the top 7 trending coins on CoinGecko, as searched by users in the last 24 hours.

How to pull live crypto prices into Excel? ›

In Excel, use the "DATA" tab and select 'From Web' to import data from the API. Follow the prompts to connect to the API and retrieve live price data for your chosen cryptocurrencies.

How do I import live crypto prices into sheets? ›

Import live Bitcoin prices into Google Sheets using the GOOGLEFINANCE function or API connectors like CoinGecko through add-ons. The simplest method involves typing '=GOOGLEFINANCE("BTC-USD")' in a cell. For more detailed data, install an API Connector add-on and configure requests for live cryptocurrency prices.

How do you insert live stock prices in Excel? ›

To create a table, go to Insert > Table. With the cells still selected, go to the Data tab, and then click Stocks. Select one or more cells with the data type, and the Add Column button will appear. Click that button, and then click a field name to extract more information.

How do I get live currency prices in Excel? ›

Use the Currencies data type to calculate exchange rates

Select the cells and then select Insert > Table. Although creating a table isn't required, it'll make inserting data from the data type much easier later. With the cells still selected, go to the Data tab and select the Currencies data type. in the cell.

What API is used to get crypto prices in Excel? ›

How to Fetch Total Crypto Market Cap Data in Excel. You can call the Crypto Global Market Data endpoint in CoinGecko API to get real-time total crypto market cap data in Excel. For historical global market cap and volume data, use the Global Market Chart endpoint.

Is CoinGecko API free? ›

CoinGecko API offers both free and paid plans.

How do I get real-time crypto data in Google Sheets? ›

The easiest way to import live crypto price data into Google Sheets is using the popular CoinGecko API endpoint '/simple/price'. This endpoint fetches real-time crypto prices for multiple coins with just one API call, and is a publicly accessible API endpoint.

How do I add a live price in Excel? ›

You can use the function like =qm_stream_last (“MSFT“) or =qm-stream_last(B2) where cell B2 is the one that contains the stock symbol. As soon as you do that, the stock prices will start showing in your Excel cell.

How do you insert real time stock prices in sheets? ›

In your Google Sheet, use the STOCKDATA formula like '=STOCKDATA("TICKER_SYMBOL")' for a real-time midpoint stock quote. For more detailed data, use '=STOCKDATA("TICKER_SYMBOL","all")' to get a full Level 1 stock quote, including bid/ask prices, volume, and more.

How do I pull live crypto prices into Excel? ›

How to Import Live Crypto Prices into Excel Spreadsheets. The easiest way to import live crypto prices is by using Excel's "Data from Web" feature, and connecting it with CoinGecko's crypto API endpoint /coins/markets. Head over to our comprehensive API documentation to retrieve this endpoint's Request URL.

How to create a crypto spreadsheet? ›

Step 1: Install Cryptosheets: Get the add-in from their website. Step 2: Connect Data: Launch Excel, go to Cryptosheets, and connect to your data source. Step 3: Retrieve Data: Use Cryptosheets' functions to get specific cryptocurrency data. Step 4: Organize and Analyze: Organize and visualize data using Excel's tools.

How do I get live crypto data? ›

Crypto Price API is a way to get real-time and historical cryptocurrency price data. This allows developers, traders, and investors to access accurate and up-to-date information on the value of various cryptocurrencies, including Bitcoin, Ethereum, and Litecoin, among others.

How do I view live crypto transactions? ›

You can also check on the status of a transaction by going to the transaction page in your wallet and reviewing the pending section. a blockchain or block explorer, which is an analytics platform for observing transactions and wallet addresses on the blockchain.

How to get data from CoinMarketCap to Excel? ›

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.

Top Articles
Danish wind giant, reeling from $4 billion write-off in New Jersey, calls America 'the most painful part of our portfolio'
North American Startup Funding Weakens Further In Q1
Dainty Rascal Io
Frases para un bendecido domingo: llena tu día con palabras de gratitud y esperanza - Blogfrases
Jordanbush Only Fans
Average Jonas Wife
Libiyi Sawsharpener
Tyson Employee Paperless
Unity Stuck Reload Script Assemblies
Activities and Experiments to Explore Photosynthesis in the Classroom - Project Learning Tree
라이키 유출
Whiskeytown Camera
Imbigswoo
Morgan Wallen Pnc Park Seating Chart
Raid Guides - Hardstuck
Med First James City
5808 W 110Th St Overland Park Ks 66211 Directions
Evil Dead Rise Showtimes Near Regal Columbiana Grande
Nj State Police Private Detective Unit
Amc Flight Schedule
Air Force Chief Results
Marine Forecast Sandy Hook To Manasquan Inlet
Timeforce Choctaw
Why do rebates take so long to process?
Azur Lane High Efficiency Combat Logistics Plan
Raw Manga 1000
Troy Gamefarm Prices
48 Oz Equals How Many Quarts
Il Speedtest Rcn Net
Hannah Palmer Listal
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
Victory for Belron® company Carglass® Germany and ATU as European Court of Justice defends a fair and level playing field in the automotive aftermarket
Housing Intranet Unt
N.J. Hogenkamp Sons Funeral Home | Saint Henry, Ohio
Desales Field Hockey Schedule
County Cricket Championship, day one - scores, radio commentary & live text
Gus Floribama Shore Drugs
How does paysafecard work? The only guide you need
Rogers Centre is getting a $300M reno. Here's what the Blue Jays ballpark will look like | CBC News
Mistress Elizabeth Nyc
Boggle BrainBusters: Find 7 States | BOOMER Magazine
Walgreens Agrees to Pay $106.8M to Resolve Allegations It Billed the Government for Prescriptions Never Dispensed
Empires And Puzzles Dark Chest
Let's co-sleep on it: How I became the mom I swore I'd never be
Gamestop Store Manager Pay
Woody Folsom Overflow Inventory
Ghareeb Nawaz Texas Menu
Craigslist Woodward
Egg Inc Wiki
Blog Pch
Adams County 911 Live Incident
Ravenna Greataxe
Latest Posts
Article information

Author: Pres. Lawanda Wiegand

Last Updated:

Views: 6132

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Pres. Lawanda Wiegand

Birthday: 1993-01-10

Address: Suite 391 6963 Ullrich Shore, Bellefort, WI 01350-7893

Phone: +6806610432415

Job: Dynamic Manufacturing Assistant

Hobby: amateur radio, Taekwondo, Wood carving, Parkour, Skateboarding, Running, Rafting

Introduction: My name is Pres. Lawanda Wiegand, I am a inquisitive, helpful, glamorous, cheerful, open, clever, innocent person who loves writing and wants to share my knowledge and understanding with you.