A collection of custom Google Sheets functions that extend the limited GOOGLEFINANCE functionality.
These functions fetch/scrape real-time or near real-time financial data — including bonds, ETFs, crypto, and commodities — from multiple APIs and websites.
Currently supported data types:
- Bonds → Any bond available on Borsa Italiana
- ETPs → Any ETP (ETF/ETC/ETN) available on JustETF, priced in EUR (exchange may vary: Xetra, LSE, etc.)
- Crypto → Any cryptocurrency listed on CoinMarketCap via their official API
- Commodities → Spot prices (Gold, Silver, Platinum, Palladium in EUR per gram)
| Function Name | Description |
|---|---|
ETPPRICE(dateCell; isin) |
Returns the latest price for the specified ETP (from JustETF). |
BONDPRICE(dateCell; isin) |
Returns the latest price of a bond using the provided ISIN. |
CRYPTOPRICE(dateCell; symbol) |
Returns the latest price of a cryptocurrency using the CoinMarketCap API. |
COMMODITYPRICE(dateCell; name) |
Returns the latest spot price of a commodity. |
Note: dateCell must always be Utils!$A$1.
This reference cell is automatically updated by the script every 15 minutes and is used to force a recalculation of your custom functions whenever its value changes.
⚠️ Important: The functions use a semicolon (;) as the argument separator (e.g.,=ETPPRICE(Utils!$A$1; "IE00BK5BQT80")) because the Google Sheets locale is European.If you are using the U.S. locale, replace
;with a comma (,).
=ETPPRICE(Utils!$A$1; "IE00BK5BQT80") // Returns the price of VWCE
=BONDPRICE(Utils!$A$1; "IT0005433195") // Returns the price of BTP Tf 0,95% Mz37 Eur
=CRYPTOPRICE(Utils!$A$1; "BTC") // Returns the price of Bitcoin
=COMMODITYPRICE(Utils!$A$1; "Gold") // Returns the price of Gold (EUR/gram)
- In your Google Spreadsheet, go to Extensions → Apps Script.
- Copy and paste the contents of the files from the
src/folder into the script editor.
- In your Google Spreadsheet, go to Extensions → Apps Script.
- Download and paste the single consolidated script file from the Latest Release.
To use CRYPTOPRICE, you must add your CoinMarketCap API key to the Script Properties.
- In the Apps Script editor, click Project Settings (⚙️) → Script Properties → Add Property.
- Create a new property with:
- Property (key):
CMC_API_KEY - Value: your CoinMarketCap API key
- Property (key):
- Save your changes.
-
Save and reload your Google Sheets page.
-
A new custom menu will appear in the toolbar (see below).
- Click ⏱ → Create trigger (15 min) to enable automatic updates.
- Accept all authorization requests that appear — these are required for the script to run correctly.
- You can later select Remove trigger to disable it.
-
Once the trigger is active, you can use the functions directly in your sheet.
This project is licensed under the GNU General Public License v3.0 – see the LICENSE file for details.