PHP code example of blockmove.io / blockmove-api-php
1. Go to this page and download the library: Download blockmove.io/blockmove-api-php 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/ */
blockmove.io / blockmove-api-php example snippets
use BlockmoveAPI\APIClient;
use BlockmoveAPI\APIException;
use BlockmoveAPI\APIRequestException;
// Generated API Key from your Blockmove.io Wallet
$apiKey = 'YOUR_API_KEY';
// Generated API Secret Key from your Blockmove.io Wallet
$apiSecret = 'YOUR_API_SECRET';
// Wallet ID
$walletId = 'WALLET_ID';
try {
$result = APIClient::init($apiKey, $apiSecret)
->getWalletBalance($walletId);
var_dump($result);
}
catch (APIException $e) {
echo 'API Error: ' . $e->getMessage();
}
catch (APIRequestException $e) {
echo 'API Request failed: ' . $e->getMessage();
}