title: Request failed for https://api.coingecko.com returned code 429. Truncated server response: error code: 1015
body: <p>I'm working with getting crypto pricing on my google sheet but I keep getting an error message. I've looked around and haven't really come across anything for CoinGecko. Below is the error message. <strong>&quot;Exception: Request failed for <a href="https://api.coingecko.com" rel="nofollow noreferrer">https://api.coingecko.com</a> returned code 429. Truncated server response: error code: 1015 (use muteHttpExceptions option to examine full response) (line 843).&quot;</strong>.</p>
  <p>Here is the code starting line 843 to 865</p>
  <pre><code>var res = await UrlFetchApp.fetch(url);
  var content = res.getContentText();
  var parsedJSON = JSON.parse(content);
  
  var data=[]
  if (type==&quot;price&quot;){
    for (var i = parsedJSON['prices'].length - 1; i &gt;= 0; i--) {
      data.push([toDateNum(parsedJSON['prices'][i][0]),parsedJSON['prices'][i][1]]);
      };}
  else if (type==&quot;volume&quot;)
  { for (var i = parsedJSON['total_volumes'].length - 1; i &gt;= 0; i--) {
      data.push([toDateNum(parsedJSON['total_volumes'][i][0]),parsedJSON['total_volumes'][i][1]]);
      };}
  else if (type==&quot;marketcap&quot;)
  { for (var i = parsedJSON['market_caps'].length - 1; i &gt;= 0; i--) {
      data.push([toDateNum(parsedJSON['market_caps'][i][0]),parsedJSON['market_caps'][i][1]]);
      };}
  else 
  { data=&quot;Error&quot;;}
  
  if (data!=&quot;Error&quot;)
    cache.put(id_cache, JSON.stringify(data),expirationInSeconds);
  return data;
  </code></pre>
  <p>Any insight would be great.
  Here's the link to the GS to see entire code in apps script.<a href="https://docs.google.com/spreadsheets/d/1Jtfcw7qLWbMcHfSWfJcExBVo3DRI1iP74wPBdPeybWA/edit#gid=388229362" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1Jtfcw7qLWbMcHfSWfJcExBVo3DRI1iP74wPBdPeybWA/edit#gid=388229362</a></p>