APIs Sample

<?php

// POST transfer
$url = "https://golddata.vn//api/transfer.html" ;
$param = "token=aea442fb3c58f48034ae581e5486e49e";

$param .= "&from_wallet=QTE2MGVmZmNiNjJjMDAxMTYyNjM0MDUzNA" ;
$param .= "&to_wallet=QTA2MGVmZWVlMzNhZjAwMTYyNjMzNjk5NQ" ;

$param .= "&amount=0.2" ;

$param .= "&description=TestAPI" ;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));

// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec ($ch);
$obj = json_decode($server_output);

echo "<pre>" ;
print_r($obj);
echo "</pre>" ;

curl_close ($ch);



// GET / POST wallet_list
$param = "token=aea442fb3c58f48034ae581e5486e49e";
$url = "https://golddata.vn//api/wallet_list.html";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));

// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec ($ch);
$obj = json_decode($server_output);

echo "<pre>" ;
print_r($obj);
echo "</pre>" ;

curl_close ($ch);

// POST checksum
$param = "token=aea442fb3c58f48034ae581e5486e49e";
$param .= "&ref=A160f04e4436ce11626361412";
$param .= "&amount=1";
$param .= "&from_wallet=QTE2MGVmZmNiNjJjMDAxMTYyNjM0MDUzNA";
$param .= "&to_wallet=QTA2MGVmZWVlMzNhZjAwMTYyNjMzNjk5NQ";

$url = "https://golddata.vn//api/checksum.html";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));

// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec ($ch);
$obj = json_decode($server_output);

echo "<pre>" ;
print_r($obj);
echo "</pre>" ;

curl_close ($ch);

 

?>


Result


https://golddata.vn/api/transfer.html

	

https://golddata.vn/api/wallet_list.html

stdClass Object
(
    [code] => 200
    [result] => Array
        (
        )

    [bug] => 0
)

https://golddata.vn//api/checksum.html

stdClass Object
(
    [code] => 200
    [checksum_transfer] => 1890497852
)