title: I am trying to utilize an API but i am unsure what needs to be called to append to the document
body: <p>this is my code , I'm trying to take the date used from the api to retrieve the bitcoin price but i've been lost for quite sometime. please help. this is the documentation: <a href="https://bitcoincharts.com/about/markets-api/" rel="nofollow">https://bitcoincharts.com/about/markets-api/</a></p>
  
  <pre><code>var userDate = $("#userDate").val();
            var bitcoinApiUrl = "http://crossorigin.me/http://api.bitcoincharts.com/v1/markets.json";
      $(document).ready(function(){
          $(".btn").on("click", function(){
  
  
  
            $.ajax({
              type: "GET",
              url: bitcoinApiUrl,
              success: function(currency) {
                // for(var i = 0; i &lt; currency.length; i++) {
                  console.log(currency);
                // }
              },
              error:function(jqXHR, textStatus, errorThrown){
                alert("something went wrong man!")
              }
            });
  
            });
          });
  
      $(document).ready(function(){
          // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
          $('.modal-trigger').leanModal();
        });
  </code></pre>