PHP code example of rentberry / coinmarketcap-api

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

    

rentberry / coinmarketcap-api example snippets


$client = new Rentberry\Coinmarketcap\Coinmarketcap();
$client->getTickers();
$client->getTicker('bitcoin');
$client->getExchangeRate('ethereum', 'USD');
$client->convertToFiat(10, 'ethereum', 'USD');
$client->convertToCrypto(10, 'USD', 'ethereum');
$client->getGlobal();