title: Combining results of paginated calls with CoinMarketCap API v2
body: <p>The new CoinMarketCap api (v2) has a 100 result limit on the following call...</p>
  
  <pre><code>https://api.coinmarketcap.com/v2/ticker/
  </code></pre>
  
  <p>Which you can paginate through using...</p>
  
  <pre><code>https://api.coinmarketcap.com/v2/ticker/?start=101
  </code></pre>
  
  <p>I was previously loading all coins with code like this...</p>
  
  <pre><code>  var cmcUrl = 'https://api.coinmarketcap.com/v2/ticker/';
    var cmcResponse = UrlFetchApp.fetch(cmcUrl);
    var cmcData = JSON.parse(cmcResponse.getContentText());
  </code></pre>
  
  <p>But now I need to make multiple calls which I was hoping to do with something basic like this...</p>
  
  <pre><code>var cmcUrl = 'https://api.coinmarketcap.com/v2/ticker/';
  var cmcResponse = "";
  for (var i = 0; i &lt; 12; i++) {
      cmcResponse = cmcResponse + UrlFetchApp.fetch(cmcUrl + "?start=" + (i * 100 + 1));
  }
  var cmcData = JSON.parse(cmcResponse.getContentText());
  </code></pre>
  
  <p>But a simple addition of the previous cmcResponse to another isn't working when I come to use JSON.parse and I'm hoping there's a another way to sum the responses of each request so they retain the same object format.</p>
  
  <p>I did find a hint using fetchAll in this post, but would prefer to simply sum responses if it's possible...</p>
  
  <p><a href="https://stackoverflow.com/questions/50595612/using-coinmarketcap-api-v2-with-google-sheets-adding-to-js-object-with-multipl?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">Using coinmarketcap api v2 with google sheets - adding to js object with multiple calls</a></p>