Last active
January 2, 2025 20:31
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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