CryptoSheet Oracle is an open-source Google Apps Script tool that brings real-time cryptocurrency prices directly into Google Sheets using the CoinMarketCap API.
The project is designed for portfolio tracking, financial dashboards, and spreadsheet automation, with a strong focus on simplicity, performance, and secure API usage.
- Live cryptocurrency prices in USD
- Supports all cryptocurrencies listed on CoinMarketCap
- Works directly inside Google Sheets
- Formula-based usage in spreadsheet cells
- Bulk price updates for ranges
- Script Cache to reduce API calls
- Error recovery for temporary API failures
- Price lookup by symbol or CoinMarketCap ID
- Crypto portfolio tracking
- Personal finance spreadsheets
- Investment dashboards
- Automated reporting
- Educational and open-source projects
Screenshots are available in the /screenshots directory.
formula-example.png– crypto price formula usage in Google Sheetstable-example.png– automatic price updates in a tablecrypto-list.png– full cryptocurrency list imported from CoinMarketCap
- Google account
- Google Sheets
- CoinMarketCap API key (free tier is sufficient)
-
Create an account on CoinMarketCap
https://coinmarketcap.com/api/ -
Generate an API key in your dashboard
-
Open Google Sheets
https://docs.google.com/spreadsheets/ -
Create a new spreadsheet or open an existing one
-
In Google Sheets, open: Extensions → Apps Script
-
A new Apps Script project will open in a separate tab
Official documentation:
https://developers.google.com/apps-script
- Remove any existing code in the editor
- Copy the content of
src/cryptoSheetOracle.gs - Paste it into the Apps Script editor
- Save the project
Do not hardcode API keys in the source code.
-
In Apps Script, open: Project Settings → Script Properties
-
Add a new Script Property:
Key: CMC_API_KEY
Value: your_api_key_here
- Save the changes
- In Apps Script, run any function (for example
getCryptoPrice) - Google will request permissions
- Review and approve access
Use directly in Google Sheets cells:
=getCryptoPrice("BTC")
=getCryptoPrice("ETH")
=getCryptoPriceId("", 1)
Spreadsheet layout:
Column A: Symbol
Column B: Price
Run the function:
updatePrices()
An example spreadsheet is available in:
/examples/example-sheet.xlsx
Structure:
Symbol | Price (USD)
BTC | =getCryptoPrice(A2)
ETH | =getCryptoPrice(A3)
SOL | =getCryptoPrice(A4)
- Prices are cached for 5 minutes
- Reduces API usage
- Improves performance and stability
- Helps stay within free API limits
- Temporary API issues return #ERROR!
- updateErrorCells() retries failed formulas
- Prevents broken sheets during API downtime
- API keys are stored in Script Properties
- No secrets are committed to GitHub
- Safe for public repositories
Contributions are welcome.
You can help by:
- Improving performance
- Adding new features
- Fixing bugs
- Improving documentation
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a pull request
- Multi-currency support (EUR, UAH, GBP)
- Scheduled automatic refresh
- Percentage change tracking
- Historical prices
- Chart generation
MIT License
This project is free to use, modify, and distribute.