CloudBT CloudBT
  • 20-10-2018, 14:33:05
    #1
    merhaba,

    https://bittrex.com/api/v1.1/public/...market=ETH-ETC

    bu veriyi ekrana yazdırmak istiyorum tablolara ayırarak tablo kısmı basit

    fakat örnek olarak ben sadece

    Quantity: 12.66921167,
    Price: 0.0469527,
    Total: 0.59485369,

    bu kısımları almak istiyorum

    <?php
    $homepage = file_get_contents('https://bittrex.com/api/v1.1/public/getmarkethistory?market=ETH-ETC');
    var_dump($homepage);
    
    ?>
    bu kod ile herşeyi çekiyor ben sadece yukarıdakileri çekmek istiyorum ne yapmam gerek yardımcı olurmusunuz
  • 20-10-2018, 14:48:57
    #2
    Backend Developer
    RadloF adlı üyeden alıntı: mesajı görüntüle
    merhaba,

    https://bittrex.com/api/v1.1/public/...market=ETH-ETC

    bu veriyi ekrana yazdırmak istiyorum tablolara ayırarak tablo kısmı basit

    fakat örnek olarak ben sadece

    Quantity: 12.66921167,
    Price: 0.0469527,
    Total: 0.59485369,

    bu kısımları almak istiyorum

    <?php
    $homepage = file_get_contents('https://bittrex.com/api/v1.1/public/getmarkethistory?market=ETH-ETC');
    var_dump($homepage);
    
    ?>
    bu kod ile herşeyi çekiyor ben sadece yukarıdakileri çekmek istiyorum ne yapmam gerek yardımcı olurmusunuz

    <?php
    $new = json_decode($homepage,true);
    
    echo $new->Quantity;
    // Yada
    
    echo $new['Quantity'];
    
    
    ?>
  • 20-10-2018, 14:49:57
    #3
    <?php
    $homepage = file_get_contents('https://bittrex.com/api/v1.1/public/getmarkethistory?market=ETH-ETC');
    
    $j = json_decode($homepage,true);
    
    $Quantity = $j[result][0][Quantity];
    $Price = $j[result][0][Price];
    $Total = $j[result][0][Total];
    
    
    
    //echo $Quantity;
    //echo $Price;
    //echo  $Total;
    ?>