If you use Google Sheets and need current prices for various cryptocurrencies, the GOOGLEFINANCE function will import them using only the ticker symbol for that cryptocurrency. In minutes, you can have current and historical cryptocurrency data in your Google Sheets. However, a 20-minute delay between updates makes it unsuitable for real-time decisions.
In this article, you will learn how to use the GOOGLEFINANCE function to pull cryptocurrency prices into your Google Sheets. You will also learn about other ways of getting crypto prices from Google Sheets, including other functions in Google Sheets.
Can I use Google Finance for Crypto Prices?
Google Sheets’ GOOGLEFINANCE function can be used to get cryptocurrency prices. Simply type in, between quotation marks, the ticker symbol for the cryptocurrency as the only argument for the function. Alternatively, type the ticker symbol, without quotation marks, into a cell and use the cell reference in the formula.
A list of ticker symbols for most cryptocurrencies - of which there are thousands - is available on GitHub.
You want to analyze Yahoo Finance data in Google Sheets but are still using copy-paste? Here’s how to import Yahoo Finance data into Google Sheets instead.READ MORE
How to Get Crypto Prices in Google Sheets with the Google Finance Function?
Follow the steps below to get crypto prices using Sheets’ GOOGLEFINANCE formula.
- 1. Open Google Sheets.
- 2. In an empty cell, type in the ticker symbol for the cryptocurrency you want. In this example, I will get the price for Bitcoin in USD. The ticker symbol is BTCUSD.
- 3. In a separate cell, type in the GOOGLEFINANCE formula. Select the cell with the ticker symbol as the only parameter and close the parenthesis.
- 4. Once you press “Enter”, you may see “Loading…” in the cell for a few seconds, and then you’ll see the price for your chosen cryptocurrency.
- 5. To format as a currency ($), click on the dollar symbol on the toolbar, as shown below.
Other Ways to Get Crypto Prices in Google Sheets
There are multiple methods for getting crypto prices into Google Sheets, including other native functions and add-ons.
Get Crypto Prices with IMPORTXML
Google Sheets’ IMPORTXML function can be used to get crypto prices from many web pages. All you need are the URL and the XPath to the object that represents the price of your chosen cryptocurrency.
There are many ways to get the XPath for a specific object, but using Chrome’s Inspect feature is quick and simple.
For example, CoinMarketCap provides prices for a variety of cryptocurrencies.
Find the XPath
- 1. Open the website in Chrome and find the price for the cryptocurrency you want.
- 2. Select the value and right-click. From the menu, choose “Inspect.”
- 3. In the Inspect window, the line of code corresponding to the price will be selected. If the highlighted section is not quite right, hover over the lines of code around the selected one until you find one that highlights the price exactly.
- 4. Right-click on the line of code and select Copy > Copy full XPath.
How to Use GOOGLEFINANCE Function in Google Sheets?
Import current or historical financial market data from Google Finance & monitor real-time. Here's how to use the GOOGLEFINANCE function in Google SheetsREAD MORE
Use IMPORTXML with URL and XPath
- 1. In Google Sheets, type the URL and the XPath into separate cells.
- 2. In another cell, type in the formula and select the cell with the URL as the first parameter.
- 3. Select the cell with the XPath as the second parameter and close the parenthesis.
- 4. Press “Enter” to get the price for your chosen cryptocurrency.
Get Crypto Prices with IMPORTDATA
Google Sheets’ IMPORTDATA function can also be used to get cryptocurrency prices from specific webpages. Even though the function is designed to be used with CSV and TSV files, there is a website that publishes crypto prices in a way that allows us to use this function.
The Cryptoprices.cc website offers a simple API where all the endpoints return text. You just need to use the URL for the cryptocurrency you need. All the URLs are available on the sitemap, which is also a text file. This means you can also use IMPORTDATA to get that list and choose the URL from Sheets.
Get Crypto Prices with the CRYPTOFINANCE Add-on
Another way of pulling crypto prices into Google Sheets is the CRYPTOFINANCE add-on, which provides a variety of additional features. If you have a paid data plan with Cryptowatch, you can access your account through the CRYPTOFINANCE add-on in Google Sheets. However, even with a free account, you can access all of Cryptowatch’s Public data.
As you have seen, it’s easy to get cryptocurrency prices using the Google Sheets GOOGLEFINANCE function. Although it’s possible to do it with other Sheets’ functions used to import external data, they are only useful if you have a source that provides crypto prices in the required format.
You now know how to use Google Sheets’ GOOGLEFINANCE function to get cryptocurrency prices. You also know about some other methods you can use to get these prices, like the Google Sheets IMPORTXML function and the IMPORTDATA function functions, as well as the CRYPTOFINANCE add-on.
To learn more about importing financial data, as well other types of data into Google Sheets, check out these related articles.