PHP code example of vincenth520 / bittrex

1. Go to this page and download the library: Download vincenth520/bittrex library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vincenth520 / bittrex example snippets


use Bittrex\Bittrex;

$apikey='';
$apisecret='';

$Bittrex = new Bittrex($apikey,$apisecret);

$balance = $Bittrex->getBalance();

var_dump($balance);

use Bittrex\Bittrex;

$apikey='';
$apisecret='';

$Bittrex = new Bittrex($apikey,$apisecret);

$LTC = $Bittrex->getticker('BTC-LTC');
var_dump($LTC);

use Bittrex\Bittrex;

$apikey='';
$apisecret='';

$Bittrex = new Bittrex($apikey,$apisecret);

$BTC = $Bittrex->getBtcPrice();
var_dump($BTC);

array(1) {
  [3]=>
  array(5) {
    ["Currency"]=>
    string(3) "SPR"
    ["balance"]=>
    float(46.64854959)
    ["Last"]=>
    float(0.000145)
    ["estbtc"]=>
    float(0.00676403969055)
    ["estusd"]=>
    float(33.289356617836)
  }
}

array(3) {
  ["Bid"]=>
  float(0.01010001)
  ["Ask"]=>
  float(0.01011903)
  ["Last"]=>
  float(0.01010001)
}