PHP code example of andrederoos / nicehash-client

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

    

andrederoos / nicehash-client example snippets


$key = 'your-api-key';
$secret = 'your-api-secret';
$organisation = 'your-organisation-id';

$client = new \NiceHashClient\NiceHashClient($key, $secret, $organisation);
$message = new \NiceHashClient\message\MessageGetAccountBalance(\NiceHashClient\object\CryptoCurrency::BTC);
$response = $client->get($message->generateRequest());

echo $response->getBody();