PHP code example of escudo / api-coin-gecko-test

1. Go to this page and download the library: Download escudo/api-coin-gecko-test 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/ */

    

escudo / api-coin-gecko-test example snippets


use Escudo\CoinGeckoApi;

$api = new CoinGeckoApi('DASH');

$api->getCoin(); //'dash'

$api->getCoinsList();

$api->getData();
$api->getData(['localization' => false]);

$api->getTickers();
$api->getTickers(['order' => 'trust_score_asc ']);

$api->getHistory('30-12-2017');
$api->getHistory('30-12-2017', ['localization' => false]);

$api->getMarketChart('usd', 1);

$api->getMarketChartRange('usd', '1392577232', '1422577232');

$api->getStatusUpdates();
$api->getStatusUpdates(['per_page' => 5, 'page' => 1]);

$api->getOhls('usd', 1);

$api->setCoin('0cash');
$api->getCoin(); //'0cash'