Track Cryptocurrency Prices in Google Sheets Using GOOGLEFINANCE and IMPORTHTML

·

Keeping track of your cryptocurrency investments is crucial in today's volatile market. Google Sheets offers powerful, built-in functions that allow you to import real-time and historical crypto data directly into your spreadsheets, helping you monitor your portfolio without switching between platforms.

This guide will walk you through two primary methods: the GOOGLEFINANCE function for direct price data and the IMPORTHTML function to pull data from popular cryptocurrency websites.

Why Use Google Sheets for Crypto Tracking?

Google Sheets provides a flexible and free environment to build a personalized cryptocurrency dashboard. You can automate price updates, calculate your portfolio's performance, and create custom alerts—all within a familiar spreadsheet interface. Since it's cloud-based, your tracker is accessible from any device, anywhere.

Using the GOOGLEFINANCE Function for Crypto Prices

The GOOGLEFINANCE function is the most straightforward way to fetch real-time cryptocurrency prices. It connects directly to Google's own financial data sources.

Understanding Ticker Notation

Cryptocurrencies use specific ticker notations in the GOOGLEFINANCE function. The most common format is "MARKET:SYMBOL". For major cryptocurrencies, the market is often an exchange like NASDAQ or OTCMKTS, but for crypto, you'll typically use the currency pair format.

Method 1: Using BTC-USD Notation

To get the price of Bitcoin in US Dollars, you can use a simple formula.

=GOOGLEFINANCE("BTC-USD")

This formula returns the current price of Bitcoin. By default, it might only show the price. To get more details like the 24-hour change, you can specify the attribute.

=GOOGLEFINANCE("BTC-USD", "price")
=GOOGLEFINANCE("BTC-USD", "change")

Method 2: Using Currency:BTCUSD Notation

An alternative notation uses the "Currency" prefix. This format can sometimes provide more consistent results across different cryptocurrencies.

=GOOGLEFINANCE("Currency:BTCUSD")

This method works for other major cryptocurrencies like Ethereum (ETH), Litecoin (LTC), and Dogecoin (DOGE). Simply replace the ticker symbol accordingly.

=GOOGLEFINANCE("Currency:ETHUSD")
=GOOGLEFINANCE("Currency:LTCUSD")
=GOOGLEFINANCE("Currency:DOGEUSD")

Pulling Historical Data

Beyond the current price, GOOGLEFINANCE can retrieve historical data. This is invaluable for tracking performance over time or performing technical analysis.

To get the closing price of Bitcoin for the past 30 days, use:

=GOOGLEFINANCE("BTC-USD", "price", TODAY()-30, TODAY())

This will populate a range of cells with dates and corresponding closing prices.

Using IMPORTHTML for Advanced Crypto Data

While GOOGLEFINANCE is powerful, its crypto coverage can be limited. The IMPORTHTML function allows you to scrape data from cryptocurrency websites like CoinMarketCap, Moneycontrol, and TradingView, giving you access to a much wider range of coins and metrics.

Importing Data from CoinMarketCap

CoinMarketCap is a popular source for cryptocurrency market caps, rankings, and prices. You can import a watchlist or a specific table.

To import the top 10 cryptocurrencies by market cap:

=IMPORTHTML("https://coinmarketcap.com/", "table", 1)

The number 1 refers to the first table on the webpage. You may need to experiment with the index number to target the specific data you need.

Fetching Data from Moneycontrol

Moneycontrol provides financial data, including cryptocurrency information. The process is similar.

=IMPORTHTML("https://www.moneycontrol.com/cryptocurrency", "table", 1)

Pulling Data from TradingView

TradingView is a hub for traders, offering charts, ideas, and market data. You can import specific tables from its market overview pages.

=IMPORTHTML("https://www.tradingview.com/markets/cryptocurrencies/prices-all/", "table", 1)

A crucial step when using IMPORTHTML is to inspect the webpage to identify the exact table number containing your desired data. Right-click on the table and select "Inspect" to find its position in the page's structure.

Building Your Real-Time Cryptocurrency Tracker

Combining these functions allows you to create a comprehensive tracker.

  1. Create a Watchlist: List the cryptocurrencies you own in one column (e.g., BTC-USD, ETH-USD).
  2. Fetch Real-Time Prices: Use a GOOGLEFINANCE formula in the adjacent column to pull the current price for each coin.
  3. Input Your Holdings: In a third column, enter the quantity of each cryptocurrency you hold.
  4. Calculate Portfolio Value: Create a formula to multiply the price by the quantity for each holding.
  5. Add Historical Charts: Use the historical data feature of GOOGLEFINANCE to create charts visualizing the performance of your assets.

For a more advanced setup that aggregates data from multiple sources, you can explore more strategies for building a powerful dashboard.

Important Considerations and Limitations

Frequently Asked Questions

Why is my GOOGLEFINANCE formula returning an error?

This is often due to an incorrect ticker symbol. Ensure you are using the exact format Google Finance supports (e.g., "BTC-USD" or "Currency:BTCUSD"). For lesser-known coins, the function might not have data available.

How often does the data in my sheet update?

Data from GOOGLEFINANCE and IMPORTHTML is not continuous. Google Sheets automatically refreshes the data periodically, usually every few minutes. You can also force a manual refresh by reopening the sheet or pressing Ctrl+R.

Can I track cryptocurrencies not listed on major exchanges?

Yes, but it's more challenging. GOOGLEFINANCE likely won't support them. Your best bet is to use IMPORTHTML to scrape data from a website that lists the coin. However, finding a stable and reliable source can be difficult.

Is there a way to get more data points like 24h volume or market cap?

Absolutely. The GOOGLEFINANCE function for crypto is primarily for price. For volume, market cap, and other metrics, you must rely on the IMPORTHTML function to import tables from data-rich websites like CoinMarketCap or CoinGecko.

My IMPORTHTML function stopped working. What should I do?

The website you are pulling data from probably updated its design, changing the structure of its HTML tables. You will need to re-inspect the page to find the new index number for the table you want to import and update your formula accordingly.

Can I set up price alerts in Google Sheets?

While there's no built-in alert feature, you can create a workaround. Use a formula to check if a price goes above or below a certain threshold (e.g., =IF(B2>50000, "ALERT: Above $50K", "")). You would then need to manually check the sheet or use a separate notification script. For automated, real-time tools beyond spreadsheets, you can view real-time tools designed for this purpose.