Skip to content

Instantly share code, notes, and snippets.

@reks-scripts
Last active January 2, 2025 20:31
Show Gist options
  • Save reks-scripts/837f00c2176f7af6c224dd810a62bb40 to your computer and use it in GitHub Desktop.
Save reks-scripts/837f00c2176f7af6c224dd810a62bb40 to your computer and use it in GitHub Desktop.
Google Sheets Apps Script function that gets the current price of $DOGE
function getDogePrice() {
const headers = {
'Content-Type': 'text/html'
};
const options = {
'method' : 'get',
'headers': headers,
'muteHttpExceptions': true
};
const response = UrlFetchApp.fetch("https://cryptoprices.cc/DOGE", options);
const price = response.getContentText().trim() || "Price not found";
Logger.log("Current Doge Price: " + price);
return price;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment