How to get live crypto prices in Google Sheets
For bitcoin and ether, type =GOOGLEFINANCE("CURRENCY:BTCUSD") or =GOOGLEFINANCE("CURRENCY:ETHUSD") in a cell; it needs no add-on. For other coins, add a short Apps Script that calls CoinGecko's free API and use it like a formula, for example =CRYPTOPRICE("solana"). Both are free; prices refresh every few minutes, not every second.
Try it free Crypto Price Lookup API — 25 coins per call, $0.002 · $0.002 / call
Way 1: GOOGLEFINANCE, no setup
It works well for bitcoin and ether. Google doesn't document which other coins it covers, so test any other symbol before you rely on it; many return #N/A.
- Click a cell and type =GOOGLEFINANCE("CURRENCY:BTCUSD").
- Swap the pair for other quotes: CURRENCY:BTCEUR, CURRENCY:ETHUSD, CURRENCY:ETHGBP.
- Multiply by your holdings in the next column for a running total.
Way 2: an Apps Script for any coin
Get a free Demo key from CoinGecko, then in your sheet open Extensions, Apps Script, paste this and save. The cache stops every cell from calling CoinGecko on each recalculation.
const KEY = "YOUR_COINGECKO_DEMO_KEY";
/** =CRYPTOPRICE("bitcoin") or =CRYPTOPRICE("solana", "eur") */
function CRYPTOPRICE(id, currency) {
currency = (currency || "usd").toLowerCase();
id = String(id).trim().toLowerCase();
const cache = CacheService.getScriptCache();
const key = id + ":" + currency;
const hit = cache.get(key);
if (hit) return Number(hit);
const url = "https://api.coingecko.com/api/v3/simple/price?ids=" +
encodeURIComponent(id) + "&vs_currencies=" + currency;
const res = UrlFetchApp.fetch(url, { headers: { "x-cg-demo-api-key": KEY }, muteHttpExceptions: true });
const price = JSON.parse(res.getContentText())[id]?.[currency];
if (price === undefined) return "not found";
cache.put(key, String(price), 300);
return price;
}
Use CoinGecko ids, not tickers
The script takes the coin's CoinGecko id: bitcoin, ethereum, solana, ripple, chainlink. The id is in the address of the coin's page on coingecko.com. A ticker like SOL won't match.
Way 3: IMPORTXML from a web page
You'll find guides that scrape a price from a site with IMPORTXML. It breaks whenever the site changes its layout, and many price sites block it. Use it only as a last resort.
Where our API fits, and where it doesn't
Our Crypto Price Lookup API returns up to 25 coins per call, by ticker or CoinGecko id, with price, 24h change, volume and market cap. It's $0.002 per call, paid in USDC on Base with x402. Google Sheets can't make that payment by itself, so for a personal sheet the free options above are the better fit.
It suits a script, n8n flow or AI agent that already has a wallet and writes prices into a sheet. To see the output first, try it 5 times a day free on the listing page.
The product
Questions
How often does GOOGLEFINANCE update crypto prices?
Google says quotes can be delayed by up to 20 minutes. It's fine for a portfolio overview, not for trading.
Why does my Apps Script show "Loading..." or an error?
Custom functions have a run-time limit and CoinGecko may refuse too many calls. Keep the cache, and avoid one formula per row for hundreds of rows.
Can I get historical prices in Sheets?
GOOGLEFINANCE takes start and end dates for its supported pairs. For other coins, CoinGecko's market_chart endpoint can be called from Apps Script the same way.
Related
Updated 2026-12-02
