Keeping track of your cryptocurrency portfolio manually can be time-consuming and error-prone. If you're managing your crypto balances in a Google Sheet, automating price updates is a game-changer. This guide walks you through a free, reliable method to pull live crypto prices directly into your spreadsheet—no paid tools or complex setups required.
By integrating an API with Google Apps Script, you’ll gain real-time pricing data at the click of a button. Whether you're tracking Bitcoin, Ethereum, or emerging altcoins, this solution scales with your needs.
Why Automate Crypto Price Tracking?
Manually updating crypto prices means constant browser switching, outdated data, and potential miscalculations. Automation eliminates these inefficiencies. With dynamic pricing:
- Your portfolio valuation stays current
- You make informed decisions faster
- Time spent on maintenance drops significantly
This method uses CoinMarketCap’s free API and Google Apps Script, both accessible and powerful tools that require no coding expertise to implement.
👉 Discover how easy it is to automate your crypto tracking today.
Step 1: Get Your Free API Key
To fetch live cryptocurrency data, you need an API key from a reliable source. CoinMarketCap (now part of CoinGecko) offers a free tier perfect for personal use.
Here's how to get started:
- Visit pro.coinmarketcap.com and sign up for a free account.
- After logging in, navigate to the "API Keys" section under settings.
- Generate a new API key and copy it securely.
🔐 Keep your API key private. It acts like a password—don’t share it or expose it publicly.
The free plan allows thousands of requests per month, more than enough for regular portfolio checks.
Step 2: Set Up Your Google Sheet
Now that you have your API key, create a dedicated sheet to display the data.
Follow these steps:
- Open Google Sheets and create a new blank spreadsheet.
- Name the sheet "CoinMarketCap" (or any name you prefer—just ensure consistency in the code).
- Click on Extensions > Apps Script to open the scripting environment.
This built-in tool lets you run JavaScript-based code directly within Google Workspace, making it ideal for automation tasks like this.
Step 3: Add the Automation Script
In the Apps Script editor, paste the following code. This script does three key things:
- Fetches real-time crypto prices from CoinMarketCap
- Parses the JSON response
- Populates your sheet with symbol and price data
It also adds a custom menu called "Crypto Menu" with a one-click refresh option.
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Crypto Menu')
.addItem('Refresh coinpanel', 'callCoinBase')
.addToUi();
}
function callCoinBase() {
var options = {
"async": true,
"crossDomain": true,
"method": "GET",
"headers": {
"X-CMC_PRO_API_KEY": "{your API Key}",
"Accept": "application/json"
}
};
var response = UrlFetchApp.fetch("https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BOBA,BTC,ETH,FTM,VET,THETA,ZIL,COTI,AR,SOL,MATIC,GRT,DOT,1INCH,ADA,LUNA,AVAX,TLM,RNDR,MANA,SRM,RIN,SBR,FTM,MOVR,LINK,AKT,ALGO,SUPER,RUNE,RMRK,CLV,SCLP,SOLR,UST,AIOZ,SFUND,INJ,TOMB,HERO,DON,XRP,BNB,RACEFI,TIME,BTC,STATIC,QRDO,GARI,WMEMO,TOMB,TSHARE,LOOP,PTP,KUJI,PRISM,TIME,BGS", options);
var data = JSON.parse(response.getContentText()).data;
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheets = spreadsheet.getSheets();
for (var sheetNum in sheets) {
if (spreadsheet.getSheets()[sheetNum].getSheetName() == "CoinMarketCap") {
spreadsheet.setActiveSheet(spreadsheet.getSheets()[sheetNum]);
var sheet = SpreadsheetApp.getActiveSheet();
var x = 1;
for (var coin in data) {
sheet.getRange(x, 1).setValue(coin);
sheet.getRange(x, 2).setValue(data[coin].quote.USD.price);
x++;
}
}
}
}Important: Replace {your API Key}
Before saving:
- Locate
{your API Key}in the script - Replace it with your actual CoinMarketCap API key (keep quotes)
After saving the script:
- Click Save Project
- Refresh your Google Sheet
- A new menu labeled "Crypto Menu" will appear
Click Refresh coinpanel to pull live prices instantly.
⚠️ You may see security prompts when running the script for the first time. Since you wrote the code yourself and understand its function, it's safe to proceed.
👉 Supercharge your crypto workflow with automated tools and insights.
Customizing the Script for Your Portfolio
The default script includes over 50 cryptocurrencies. But you likely don’t hold all of them.
To tailor it:
- Edit the
symbol=parameter in the URL - List only the coins you want (e.g.,
BTC,ETH,SOL,ADA) - Separate symbols with commas and no spaces
Example:
.../quotes/latest?symbol=BTC,ETH,SOL,ADA,XRPYou can also modify the output format:
- Add timestamp:
sheet.getRange(x,3).setValue(new Date()); - Include market cap or 24h change by accessing other JSON fields like
data[coin].quote.USD.market_cap
This flexibility makes the script scalable—from simple trackers to advanced dashboards.
Core Keywords for SEO Optimization
To ensure this guide ranks well and meets search intent, here are the primary keywords naturally integrated throughout:
- auto update crypto prices
- Google Sheets crypto tracker
- free crypto API
- CoinMarketCap API
- Google Apps Script crypto
- live cryptocurrency prices
- automate crypto portfolio
- crypto price bot
These terms reflect common user queries while aligning with content depth and relevance.
Frequently Asked Questions
Can I use this method without coding knowledge?
Yes! While the process involves pasting code, no actual programming is required. Just follow the step-by-step instructions—you’re copying and replacing values, not writing logic.
Is the CoinMarketCap API really free?
Yes. The free tier supports up to 333 API calls per day (10,000 per month), which is sufficient for manual or hourly updates on personal projects.
Will my data update automatically?
By default, prices update only when you click “Refresh coinpanel.” For true automation, set up a time-driven trigger in Apps Script to run callCoinBase every hour or day.
What if I rename my sheet?
The script looks specifically for a sheet named "CoinMarketCap". If you change the name, update the condition if (spreadsheet.getSheets()[sheetNum].getSheetName() == "CoinMarketCap") accordingly.
Can I display prices in other currencies?
Absolutely. Change USD in data[coin].quote.USD.price to another supported currency like EUR, GBP, or JPY. Ensure your API plan supports multi-currency endpoints.
Are there rate limits I should know about?
Yes. The free plan limits you to roughly 10 calls every minute. Avoid rapid clicks; spacing out requests prevents throttling.
👉 Stay ahead with real-time data and powerful crypto tools—start now.
Final Thoughts
Automating crypto price updates in Google Sheets saves time and improves accuracy. With minimal setup using CoinMarketCap’s API and Google Apps Script, you gain a professional-grade tracking system at zero cost.
Whether you're a casual investor or managing multiple wallets, this method brings efficiency and clarity to your workflow.
As crypto markets move fast, staying updated shouldn’t slow you down. Implement this solution today and take control of your digital asset tracking—smartly and securely.