Kõikvõimalikud API'd

4150 vaatamist
  1. Brunn

    2014-02-11 Administrator Estonia

    CoinDesk Bitcoin Price Index API http://www.coindesk.com/api
    Coinbase https://coinbase.com/docs/api/overview
    https://www.virwox.com/developers.php
    https://vircurex.com
    https://btc-e.com/api/documentation
    https://www.coins-e.com/exchange/api/documentation

  2. Brunn

    2014-02-14 Administrator Estonia

    https://vircurex.com/api/get_info_for_1_currency.json?base=LTC&alt=BTC

    {"base":"LTC","alt":"BTC","lowest_ask":"0.03395498","highest_bid":"0.0328","last_trade":"0.0328","volume":"4613.1615811"}
    
    $data = file_get_contents('https://vircurex.com/api/get_info_for_1_currency.json?base=LTC&alt=BTC');
    $obj = json_decode($data);
    echo $obj->{'base'}.'<br>';
    echo $obj->{'alt'}.'<br>';
    echo $obj->{'lowest_ask'}.'<br>';
    echo $obj->{'highest_bid'}.'<br>';
    echo $obj->{'last_trade'}.'<br>';
    echo $obj->{'volume'}.'<br>';

    https://btc-e.com/api/2/ltc_eur/ticker
    https://btc-e.com/api/2/btc_eur/ticker

    {"ticker":{"high":730,"low":416,"avg":573,"vol":2019914.11738,"vol_cur":3475.31982,"last":569.61999,"buy":569.41999,"sell":559.4,"updated":1386447225,"server_time":1386447225}}
    
    $json_url = 'https://btc-e.com/api/2/btc_eur/ticker'; 
    $ch = curl_init( $json_url ); 
    $options = array(CURLOPT_RETURNTRANSFER => true,CURLOPT_HTTPHEADER => array('Content-type: application/json'),);
    curl_setopt_array( $ch, $options );
    $result =  curl_exec($ch); 
    curl_close($ch); 
    $bodyb = str_replace("\\", "\\\\", $result);
    $data = json_decode(ltrim(trim($bodyb), '/')); 
    foreach ($data as $message)
    {
       $btceur= 'BTC/EUR: <b><font color="#21610B">'.round($message->last,2).'</font color></b> ';
    }