【发布时间】:2017-08-18 09:06:54
【问题描述】:
我正在尝试使用 bittrex API 获取我的钱包余额,但我不明白为什么 bittrex 文档提供的代码不起作用:
$apikey = 'xxx';
$apisecret = 'xxx';
$nonce = time();
$uri = 'https://bittrex.com/api/v1.1/market/getopenorders?apikey=' .
$apikey . '&nonce=' . $nonce;
$sign = hash_hmac('sha512', $uri, $apisecret);
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:' . $sign));
$execResult = curl_exec($ch);
$obj = json_decode($execResult);
curl_exec 函数返回 false,我不明白为什么。
感谢您的帮助!
【问题讨论】: