Problem:
- On July 23, this code suddenly stop working.
Environment:
- I am running this code on Google Apps Script.
- I call only 14 calls per day for the coin gecko API server.
- 8 calls / sec. is the Coin Gecko's rate Limit.
- 50 calls / min. is its Free Plan's Rate Limit.
- I am using Coin Gecko Free Plan.
- I do use Utilities.sleep() accordingly.
- There are no problems with the browser. https://api.coingecko.com/api/v3/coins/bitcoin/
- The busy-server-error-message used to be a different message. But now it returns a different error message.
Error Message:
Exception: Request failed for https://api.coingecko.com returned code 429. Truncated server response: {"status":{"error_code":429, "error_message": "You've exceeded the Rate Limit. Please visit https://www.coingecko.com/en/api/pricing to subscribe to ... (use the muteHttpExceptions option to examine the full response)
Code:
function test() {
const URL = 'https://api.coingecko.com/api/v3/coins/bitcoin'
Utilities.sleep(10000)
const fetchedData1 = UrlFetchApp.fetch(url)
console.log(fetchedData1)
Utilities.sleep(10000)
const fetchedData2 = UrlFetchApp.fetch(url)
console.log(fetchedData2)
}