Bitcoin Forum

Economy => Service Discussion => Topic started by: ShopemNL on October 06, 2014, 12:57:38 PM



Title: Bittrex API "INVALID_PERMISSION" error
Post by: ShopemNL on October 06, 2014, 12:57:38 PM
Hi there,

Working with the bittrex api i get the following {"success":false,"message":"INVALID_PERMISSION","result":null}"

The code i use :

$nonce=time();
$uri='https://bittrex.com/api/v1.1/account/getbalance?apikey='.$apikey.'&currency=BTC&nonce='.$nonce;
$sign = hash_hmac('sha512', $uri, $apisecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign));
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
$response = curl_exec($ch);
print_r($response);