var dollar_amount = $('#totalbalance-id').html()
var dollar_amount2 = $('#totalearnings-id').html()
var dollar_amount3 = $('#totalinvest-id').html()
var dollar_amount4 = $('#totalwithdrawn-id').html()
var dollar_amount5 = $('#recentwithdrawn-id').html()
var dollar_amount6 = $('#pendingwithdrawn-id').html()
var dollar_amount7 = $('#lastinvest-id').html()




$.get("https://min-api.cryptocompare.com/data/price?fsym=USD&tsyms=BTC",function(data){
  BTC_amount = dollar_amount * data["BTC"];
  BTC_amount2 = dollar_amount2 * data["BTC"];
  BTC_amount3 = dollar_amount3 * data["BTC"];
  BTC_amount4 = dollar_amount4 * data["BTC"];
  BTC_amount5 = dollar_amount5 * data["BTC"];
  BTC_amount6 = dollar_amount6 * data["BTC"];
  BTC_amount7 = dollar_amount7 * data["BTC"];
  
  jQuery(".totalbalance-r").html(BTC_amount.toFixed(6)+ " BTC");
  jQuery(".totalearnings-r").html(BTC_amount2.toFixed(6)+ " BTC");
  jQuery(".totalinvest-r").html(BTC_amount3.toFixed(6)+ " BTC");
  jQuery(".totalwithdrawn-r").html(BTC_amount4.toFixed(6)+ " BTC");
  jQuery(".recentwithdrawn-r").html(BTC_amount5.toFixed(6)+ " BTC");
  jQuery(".pendingwithdrawn-r").html(BTC_amount6.toFixed(6)+ " BTC");
  jQuery(".lastinvest-r").html(BTC_amount7.toFixed(6)+ " BTC");
  
  });

