PHP code example of olegstyle / yobitapi

1. Go to this page and download the library: Download olegstyle/yobitapi 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/ */

    

olegstyle / yobitapi example snippets


$pairs = [
   new \OlegStyle\YobitApi\Models\CurrencyPair('btc', 'eth'),
   new \OlegStyle\YobitApi\Models\CurrencyPair('bch, 'btc'),
];
$publicApi = new \OlegStyle\YobitApi\YobitPublicApi();
$publicApi->getInfo(); // get info about all pairs
$publicApi->getTickers($pairs); // limit - 50 pairs
$publicApi->getTicker('btc', 'eth');
$publicApi->getDepths($pairs); // limit - 50 pairs
$publicApi->getDepth('btc', 'eth');
$publicApi->getTrades($pairs); // limit - 50 pairs
$publicApi->getTrade('btc', 'eth');