GAT
客户端

235680778

2017-02-17

key
skey

调用范例(PHP)

$date = new DateTime();

$stamp = $date->getTimestamp();

$mdt = " publickey_userID_secretkey_" . $stamp

$mdt = md5($mdt);

$data = array("key" => "publickey", "time" => $stamp, "md5" => $mdt, "type" => 1, "mk_type" => "btc",

"price" => "0.0001", "amount" => "100", "coinname" => "XRP");

$data_string = json_encode($data);

$ch = curl_init ();

curl_setopt ( $ch, CURLOPT_URL, 'https://www.bit.cc/trade/t_api/submitOrder.php' );

curl_setopt ( $ch, CURLOPT_POST, 1 );

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; BIT.CC PHP bot; ' . php_uname('a') . '; PHP/' . phpversion() . ')');

$result = curl_exec($ch);

print_r($result);

-AGENT,以免被防火墙拦截。