Home
Create Wallet
Login Wallet
API/Developers
Privacy Policy
Pricing
Legal
Contact Us
//--------## Start CoinCaa.com API function ## function coincaa_api($cmd, $req = array()) { // Add below your API key $coinCaa_API = ''; // Set the API command and required fields $req['version'] = 1; $req['cmd'] = $cmd; $req['api'] = $coinCaa_API; $req['format'] = 'json'; //supported values are json and xml // Generate the query string $post_data = http_build_query($req, '', '&'); // Calculate the HMAC signature on the POST data // Create cURL handle and initialize (if needed) static $ch = NULL; if ($ch === NULL) { $ch = curl_init('https://www.coincaa.com/api/?i='.$cmd.''); curl_setopt($ch, CURLOPT_FAILONERROR, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); } curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); // Execute the call and close cURL handle return $data = curl_exec($ch); } //--------## END CoinCaa.com API function ##
//---------- Start Getting Address From CoinCaa ### //-- You can leave blank lable perameter (lable is Optional) $coinCaa_api=coincaa_api("receive", $req=Array("label" => "My First Address (Optional)")); $$coinCaa_api=json_decode($coinCaa_api, true); $coinCaa_address=$coinCaa_api['address']; $coinCaa_status=$coinCaa_api['status']; $coinCaa_error=$coinCaa_api['error']; if($coinCaa_status == 1){ echo $coinCaa_address; // Your Address Generated }else{ echo $coinCaa_error; // Something Wrong } //---------- END Getting Address From CoinCaa ###
//---------- Start Send Money From CoinCaa ### $CoinCaa_API=''; // add here your CoinCaa API key if($_POST['api_key'] == $CoinCaa_API){ echo $_POST['value']; // Amount in Stoshi echo round($_POST['value']/100000000,8); // Amount in BTC echo $_POST['value_USD']; // Amount in USD echo $_POST['confirmations']; // Confirmations of Transaction echo $_POST['transaction_hash']; // Transaction Hash ID echo $_POST['fee']; // Transaction fee echo $_POST['address']; // Receiver Address } //---------- END Send Money From CoinCaa ###
//---------- Start Sending From CoinCaa ### $to=''; // BTC Address $amount=''; //Amount in Stoshi like 10000, minimum 550 stoshi allowed (If you will send currency perameter USD then add amount here in USD) $note=''; //Optinal: you can add a NOTE for your memory $currency=''; //Optinal: You can add USD in this Value(If you will leave blank then your currency will stoshi) $coinCaa_api=coincaa_api("send", $req=Array("to" => $to,"currency" => $currency,"amount" => $amount,"note" => $note)); $coinCaa_api=json_decode($coinCaa_api, true); if($coinCaa_api['status'] == 1){ echo $coinCaa_api['amount']; //Amount in stoshi echo round($coinCaa_api['amount']/100000000,8); // Amount in BTC echo $coinCaa_api['amount_USD']; // Amount in USD echo $coinCaa_api['fee']; // Transaction fee in stoshi echo $coinCaa_api['fee_USD']; // Fee in USD echo $coinCaa_api['tx_hash']; // BTC hash ID }else{ echo $coinCaa_api['error']; // Showing Error } //---------- END Sending From CoinCaa ###