How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (2024)

Having access to real-time price data is crucial for making informed decisions. Unsurprisingly, many financial analysts and traders use Microsoft Excel to stay on top of their portfolio, track stock and crypto performance, asset details, profit and loss, return on investment (ROI), among other metrics. In order to fetch live price data conveniently, we’ll be utilizing Excel’s native Stocks integration feature and CoinGecko’s crypto API.

This step-by-step guide will walk through:

  1. How to import real-time stocks data into Excel
  2. How to import live crypto data into Excel (including coins in trending categories)
  3. Bonus: Setting up a P&L tracker for your investment portfolio

Let’s jump in!

Disclaimer: This guide is prepared for Microsoft Excel users operating on Windows, and Microsoft’s Stocks data is an Office 365 subscription-only feature. Google Sheets users can alternatively refer to this guide onimporting crypto data into Google Sheets.

Fetching Real-time Stocks Data in Excel

First, create a new spreadsheet on Microsoft Excel, labeling it ‘Stocks’. On cell A1, make a list of stocks you’re currently holding or that’s on your watchlist. This is the tab where you’ll import all stocks-related data using Excel’s native Data integration.

Once you’re done, select ‘Data’ in the top navigation bar. Highlight the row of stock tickers, and click on ‘Stocks’, which will activate the integration with Microsoft Bing’s database.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (1)

Next, click on the top right icon (‘Insert Data’), and a drop-down menu will appear:

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (2)

Select all fields you’d like information on - for each selection, a new column will appear and populate accordingly. In this guide, we’ve kept it simple and included just four columns: Ticker, Price, Change, Price Change % and Market Cap.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (3)

How to Import Live Crypto Prices into Excel Spreadsheets

The easiest way to import live crypto pricesis by using Excel's "Data from Web" feature,and connecting it with CoinGecko's crypto API endpoint /coins/markets. Head over to our comprehensiveAPI documentation to retrieve thisendpoint's Request URL.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (4)

Coins List with Market Datais one of the most commonly used crypto API endpoints that traders, developers, projects and analysts rely on to fetch real-time cryptoprice data. With only two API calls on this endpoint, you can retrieve data of the top 500 cryptocurrencies listed on CoinGecko, which is typically enough for most. To import data for coins beyond the top 500 or smaller market cap cryptocurrencies, simply adjust the ‘Page’ parameters accordingly (each page displays 250 coins data).

Provide your API key andfill in the parameters:

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (5)

Tip: If you’d like to import coins data for specific crypto categories rather than pulling in a whole list of top 250 or 500 cryptocurrencies, input the respective category id in the ‘category’ parameter field.

In the example below, we’ll look at pulling data forthe ‘telegram-bots’ category.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (6)

Click on the ‘Execute’ button to generate the Request URL.

In our example, the Request URL for the top 250 cryptocurrencies is:

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=1&sparkline=false&price_change_percentage=1h%2C24h&locale=en&precision=3

The Request URL for the next 250 cryptocurrencies (top 251 to 500) is:

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=2&sparkline=false&price_change_percentage=1h%2C24h&locale=en&precision=3

As highlighted in yellowabove, the key difference between the two Request URLs generated is the page number.

Finally, the Request URL for the Telegram Bots category is:

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&category=telegram-bots&order=market_cap_desc&per_page=250&page=1&sparkline=false&price_change_percentage=1h%2C24h&locale=en&precision=3

Let’s head back to our Excel workbook and navigate to ‘Data’. This time, select ‘From Web’.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (7)

If ‘From Web’ is not available in your navigation bar, you can find it under Data > From Other Sources > From Web. If you’re a Mac OS user on Excel, you can instead rely on CryptoSheets, as this feature is applicable for Windows OSusers only.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (8)

Upon clicking ‘From Web’, a pop-up window appears. Ensure the toggle is set to ‘Basic’, copy and paste the first Request URL into the input field and select ‘OK’.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (9)

It may take a while to establish a connection to API servers on the Demo API plan.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (10)

Paid API users may tweak the Request URL to call from the root URL ‘https://pro-api.coingecko.com/api/v3/coins/markets’ and append in their Pro API key at the end of the URL. The URL structure will appear as:

https://pro-api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=1&sparkline=false&price_change_percentage=1h%2C24h&locale=en&precision=3?&x_cg_pro_api_key=YOUR_API_KEY

Once it’s loaded, Excel’s Power Query Editor appears in a new window. To avoid random query strings, you may choose to rename the query - in this example, we’ve renamed it to ‘coins/markets1-250’.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (11)

Click on ‘To Table’ at the top right corner and select ‘OK’. You won’t need to select or enter a delimiter.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (12)

Select the expand icon beside Column1 and a drop-down menu will appear. As a default, all columns will be selected. You may also uncheck the box below that states ‘Use original column name as prefix’ so that columns will be cleanly labeled.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (13)

Select ‘OK’ and the data will be expanded into various columns. Next, click on ‘Close & Load’ and the data will populate into a new worksheet, which we’ll label as ‘Top 500 Crypto + Categories’ (we’ll be adding in more cryptocurrencies in subsequent steps).

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (14)

Repeat this process, but this time using the second Request URL with the ‘Page’ parameter set to ‘2’. Instead of closing and loading this query immediately, we’ll import specific crypto categories data in the same manner as well. Given their recent rally,we’ve imported cryptocurrencies fromTelegram Bots, Real World Assets and Animal Racing categories.

Now toggle back to the first query ‘/coins/markets1-250’ in the Power Query Editor and select ‘Append Queries’.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (15)

A dialogue box appears and you can toggle to ‘Three or more tables’ and select the tables to append accordingly. This essentially combines the top 500 crypto data with specific categories (Telegram Bots, Real World Assets and Animal Racing) from the /coins/markets/ API endpoint. Click on ‘OK’ and ‘Close & Load’.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (16)

In just a few clicks and under 5 minutes, you now have a real-time, functional Excel workbook importing stocks and crypto price data! Specifically for crypto, you have a consolidated list of top 500 cryptocurrencies data and coins from trending categories you’re watching.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (17)

Refreshing the Data

On Excel, you can toggle your preferred refresh frequency by navigating to Data > Refresh All > Connection Properties. Deselect ‘Enable background refresh’ and ‘Refresh every 30 minutes’ if you’d like to manually refresh and conserve the number of API calls made, or opt for a 10-min auto-refresh like in the screenshot below.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (18)

Finally, we’ll move on to how you can customize your stocks and crypto portfolio dashboard.

Enjoyed this guide? Be sure to check out this master tutorial covering various endpointson fetching crypto prices into Excel.

How to Create a Crypto Tracker on Excel Spreadsheets

With real-time stocks and crypto price data that's pulled into your Excel spreadsheet, you can easily create an Excel crypto tracker that automates your profit and loss (PNL) using the VLOOKUP formula, and customize it to your needs. Additionally,performance metrics will automatically refresh based on your refresh control settings.

The example below shows a simple and straightforward tracker using the VLOOKUP formula, to extract data from the raw databases Stocks and Top 500 + Categories.

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (19)

Tip: Use the =IMAGE(“url”) formula to bring the crypto coins images to life!

Add formulas in the gray columns accordingly:

  • Holdings Value – Multiply Holdings # by Current Price. This depicts how much value your stocks and crypto holdings are worth, in fiat currency.
  • P&L – The difference between Holdings Value and Total Invested, essentially your unrealized profit or loss, if the position was closed at that time.
  • ROI % – Divide P&L by Total Invested to derive your Return on Investment, which determines how profitable your investment is. The higher your ROI, the more profitable your investment.

Finally, set up chart visualizations on your Excel crypto tracker by selecting the relevant cells and navigating to Insert > Recommended Charts. You’re set!

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (20)

For Day Traders: Recommended Analyst API Endpoints

Advanced traders who want access to more API endpoints, historical prices and avoid getting rate limited, may consider subscribing to our Analyst API plan. The CoinGecko API currently has 40+ endpoints, tracks 10,000+ coins across 700+ exchanges and 3,000+ NFT collections serving billions of API calls each month.

Advanced traders might also find these useful API endpoints particularly useful:

  • /coins/top_gainers_losers - get the top 30 coins with the largest price gains and losses based on specific time frames
  • /global/market_cap_chart - get historical global market cap and volume data, by no. of days away from now
  • /nfts/markets – track NFT floor prices, market cap and volume

Keen to learn more and maximize your crypto data usage? Check out our full list of API resources– we've published guides on developing crypto trading strategies, backtesting and more!

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API (2024)

FAQs

How to Pull Live Crypto & Stocks Prices into Excel | CoinGecko API? ›

First, create a new spreadsheet on Microsoft Excel, labeling it 'Stocks'. On cell A1, make a list of stocks you're currently holding or that's on your watchlist. This is the tab where you'll import all stocks-related data using Excel's native Data integration. Once you're done, select 'Data' in the top navigation bar.

How to integrate live crypto prices in Excel? ›

How can you track your crypto portfolio?
  1. Use an existing Excel crypto tracker template. ...
  2. Online crypto profit calculators. ...
  3. Use portfolio tracking software. ...
  4. Step 1: Setting up your spreadsheet. ...
  5. Step 2: Fetching live price data. ...
  6. Step 3: Inputting your crypto transactions. ...
  7. Step 4: Generating cryptocurrency price charts.
May 3, 2024

How to import live stock prices into Excel? ›

You can begin by opening Excel and creating a new worksheet where you want to import the stock prices. Next, navigate to the Google Finance website and look up the stock symbol or company name for the stock you want to track. Once you have identified the stock, locate the 'Historical Data' section on the stock's page.

How do I fetch 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.

What is the best API for historical crypto prices? ›

Financial firms, professional traders and researchers rely on CoinGecko API to retrieve historical price data to conduct analyses and backtest trading strategies, track portfolio profit and loss, discover the latest trending coins and categories, and more. Check out our case studies!

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.

How do you get live crypto prices in sheets? ›

The simplest method to import live BTC prices into Google Sheets is by using the GOOGLEFINANCE function. This function allows you to fetch current prices for various cryptocurrencies, including Bitcoin, without needing any additional add-ons or tools.

How do I import live data into Excel? ›

Quick Importing of Live Data

Open a worksheet in Excel. From the Data menu depending on version of Excel select Get & Transform Data > From Web (eg in Excel 2016) or Get External Data (eg in 2000) or Import External Data (eg in XP). In Excel 2016: Fill in the URL of the web page with your desired data table.

Does GOOGLEFINANCE have an API? ›

The Google Finance API allowed users to query market data and portfolio data until it was shutdown. Learn how to use Google's finance data today. Unfortunately, the Google Finance API was shutdown permanently on October 20, 2012 after being depreciated on May 26, 2011.

How to download crypto price data? ›

Where can I download cryptocurrency data?
  1. Connect your wallets and exchanges to CoinLedger.
  2. Let the platform import your transactions automatically.
  3. Download a csv file containing data about all of your crypto transactions.

Is CoinGecko API free? ›

CoinGecko API is a freemium, public API that provides developers with access to data about cryptocurrencies and their market prices, trading volumes, market capitalization, and other related information.

What is the best app for crypto price chart? ›

What is the best crypto charts app? TradingView, CryptoWat.ch, CryptoView, Coinigy, and GoCharting all offer a mobile app, most of which you can download and trial free.

Is there a free crypto API? ›

There are a huge number of crypto APIs, and virtually all of them offer public crypto data for free through their public endpoints. This article lists the top crypto APIs accessed by users of the API Connector extension for Sheets, along with the type of authentication they require.

Which crypto API is best? ›

Top 8 Cryptocurrency Exchange APIs of 2023
  1. Token Metrics Crypto API. ...
  2. Binance API. ...
  3. Coinbase API. ...
  4. Kraken API. ...
  5. Bitfinex API. ...
  6. Huobi API. ...
  7. Bitstamp API. ...
  8. KuCoin API.

What is real-time crypto price API? ›

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 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 I find the live option price in Excel? ›

Get Real time Option Prices in Excel
  1. Step 1 - Utilize MarketXLS options strategy templates to get started. # Template name. Download link. ...
  2. Step 2 - Create your own options template by utilizing MarketXLS functions. # Use case. ...
  3. Step 3 - Try the real-time streaming functions to get live options data. # Use case.

How do I add live values in Excel? ›

How to make an Excel real-time data spreadsheet
  1. Create a new table. The first step in using Excel's real-time data feature is to create a new table. ...
  2. Select specific cells. The cells in the table store the data within the spreadsheet. ...
  3. Click on the "Data" tab. ...
  4. Add a new column to receive the data.
Sep 22, 2023

How do I link Bitcoin prices to Excel? ›

For example, if you want to see the price of BTC in USD, you can enter BTC/USD into a cell. Microsoft Excel will see this as a valid input and pull the relevant price. In addition, Excel can help you pull the historical prices of cryptocurrencies!

Top Articles
How to Spot Fake Influencers: 7 Signs to Watch For
Gold Prices - 100 Year Historical Chart
Bj 사슴이 분수
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Kobold Beast Tribe Guide and Rewards
5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
Self-guided tour (for students) – Teaching & Learning Support
Irving Hac
Dityship
978-0137606801
VMware’s Partner Connect Program: an evolution of opportunities
Pac Man Deviantart
Destiny 2 Salvage Activity (How to Complete, Rewards & Mission)
Red Devil 9664D Snowblower Manual
Craigslist In Visalia California
Royal Cuts Kentlands
Saritaprivate
Kashchey Vodka
Cbssports Rankings
Understanding Gestalt Principles: Definition and Examples
Piri Leaked
Craigslist Rome Ny
Accuradio Unblocked
Ticket To Paradise Showtimes Near Cinemark Mall Del Norte
Buhl Park Summer Concert Series 2023 Schedule
Black Lion Backpack And Glider Voucher
Astro Seek Asteroid Chart
Noaa Marine Forecast Florida By Zone
Craigslist Sf Garage Sales
Grays Anatomy Wiki
Advance Auto Parts Stock Price | AAP Stock Quote, News, and History | Markets Insider
Pokemmo Level Caps
Weekly Math Review Q4 3
Clark County Ky Busted Newspaper
Terrier Hockey Blog
NHL training camps open with Swayman's status with the Bruins among the many questions
Miracle Shoes Ff6
Cranston Sewer Tax
Busted Newspaper Campbell County KY Arrests
Metro Pcs Forest City Iowa
303-615-0055
Armageddon Time Showtimes Near Cmx Daytona 12
Ig Weekend Dow
Electric Toothbrush Feature Crossword
Tattoo Shops In Ocean City Nj
Portal Pacjenta LUX MED
UWPD investigating sharing of 'sensitive' photos, video of Wisconsin volleyball team
53 Atms Near Me
Samantha Lyne Wikipedia
Tenichtop
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 6096

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.