- json_decode: documentation ( source)
- time: documentation ( source)
- hash_hmac: documentation ( source)
<?php
$apikey='89c8421dac1a4009a2fac2396ff91ea3';
$apisecret='43ab0e021c96427f908b3939236557e1';
$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);
echo ($uri);
echo "\n";
echo ($sign);