Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. $uri='https://bittrex.com/api/v1.1/market/getopenorders?apikey='.$apikey.'&nonce='.$nonce;
  2. $sign=hash_hmac('sha512',$uri,$apisecret);
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL, $uri);
  5. curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign));
  6. $execResult = curl_exec($ch);
  7. //curl_close($execResult);
  8. $obj = json_decode($execResult);
  9. echo $obj;
  10. var_dump($test, $obj, $execResult, $uri);
  11.  
  12. I added this:
  13.  
  14. if(!curl_exec($ch)){
  15.     die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch));
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement