PHP code example of tokenly / crypto-quote-client

1. Go to this page and download the library: Download tokenly/crypto-quote-client 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/ */

    

tokenly / crypto-quote-client example snippets


$client = new Tokenly\CryptoQuoteClient\Client();
$quote = $client->getQuote('bitcoinAverage', 'USD', 'BTC');
echo json_encode($quote, 192)."\n";

/*

{
    "name": "bitcoinAverage",
    "base": "USD",
    "target": "BTC",
    "ask": 217.55,
    "askSat": 21755000000,
    "bid": 217.19,
    "bidSat": 21719000000,
    "last": 217.39,
    "lastSat": 21739000000,
    "timestamp": 1423163845
}

*/