title: Displaying parameter from API in console
body: <p>I'm creating a system which is going to store a bitcoin historical volume data every 24 hours.
  I'm using CoinMarketCap API. <a href="https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest" rel="nofollow noreferrer">API source</a>
  My problem is that I don't understand how I need to specify the parameter to receive the exact bitcoin volume data.</p>
  
  <pre><code>    request('GET', 'http://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?CMC_PRO_API_KEY=API-KEY-HERE')
          .then((r1) =&gt; {
              var x1 = JSON.parse(r1.target.responseText);
              console.log(x1.data.quote.BTC.volume_24h); 
          }).catch(err =&gt; {
              console.log(err);
          })
  
      function request(method, url) {
          return new Promise(function(resolve, reject) {
              var xhr = new XMLHttpRequest();
              xhr.open(method, url);
              xhr.onload = resolve;
              xhr.onerror = reject;
              xhr.send();
          });
      }
  </code></pre>
  
  <p>I'm receiving error - </p>
  
  <pre><code>TypeError: Cannot read property 'BTC' of undefined
      at main.html:10
  </code></pre>
  
  <p>I was trying different combinations and selecting the symbol in endpoint as well.
  Where is my mistake and how can I receive a BTC volume only in my console log.</p>
  
  <p>If I add only console.log(x1.data);
  I receive this in console - <a href="https://i.stack.imgur.com/hwgmK.png" rel="nofollow noreferrer">Screenshot</a></p>