Get the balance of a specific coin from the faucet

EndPoint

https://anonwallet.net/micro/api/v1/balance

POST Body Parameters

ParametertypeExampleIs Required
currencystringBTCNo (default is BTC)

Code Example

/**
 * Requires libcurl
 */

$curl = curl_init();

$payload = array(
  "currency" => "BTC",
);

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_API_KEY_HERE"
  ],
  CURLOPT_POSTFIELDS => json_encode($payload),
  CURLOPT_URL => "https://anonwallet.net/micro/api/v1/balance",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}

API Response

{
    "status": 200,
    "message": "OK",
    "currency": "BTC",
    "balance": "0.10000000"
}