The easiest way to fetch cryptocurrency prices into Google Sheets and Excel.
Google Sheets does not have a built-in feature to fetch cryptocurrency prices, which is why you need an external service like Price2Sheet. Unlike browser extensions or complex integrations, Price2Sheet provides a free, simple, and secure API that works directly inside your spreadsheet.
The easiest way to get crypto prices is using IMPORTDATA
. Just copy and paste the formula:
=IMPORTDATA("https://api.price2sheet.com/raw/btc/usd")
This will insert the latest BTC to USD price as plain text.
If you prefer XML format, use IMPORTXML
:
=IMPORTXML("https://api.price2sheet.com/xml/eth/usd", "/price")
Google Sheets does not support JSON natively, but you can use a simple Apps Script:
function importJSON(url) {
var response = UrlFetchApp.fetch(url);
var json = JSON.parse(response.getContentText());
return [[json.price]];
}
Then use:
=importJSON("https://api.price2sheet.com/json/sol/usd")
By default, Price2Sheet returns numbers with a period (.
) as the decimal separator. If your spreadsheet uses a comma (,
) instead, change your locale settings or use NUMBERVALUE
:
=NUMBERVALUE(IMPORTDATA("https://api.price2sheet.com/raw/btc/eur"), ".")