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 the ticker symbol for the cryptocurrency between quotation marks 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.
GOOGLEFINANCE only covers the best-known coins, such as Bitcoin and Ethereum. If a plain ticker like BTCUSD returns an error, add the currency prefix: =GOOGLEFINANCE("CURRENCY:BTCUSD"). For other coins, use one of the methods further down.
How to get crypto prices in Google Sheets with the Google Finance function?
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.
Apply this knowledge and learn to build a stock portfolio tracker in Google Sheets.
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.
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
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.
What about the CRYPTOFINANCE add-on?
The CRYPTOFINANCE add-on used to be a popular way to do this, but it pulled its prices from Cryptowatch, which Kraken has since shut down. Recent reviews on the Google Workspace Marketplace report that the add-on no longer returns data, so the IMPORTXML and IMPORTDATA methods above are the more reliable choice.
Conclusion
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.
To learn more about importing financial data, as well other types of data into Google Sheets, check out these related articles.
