pool/web/yaamp/core/exchange/bittrex.php
Tanguy Pruvot d8fe695a46 Some constants for the btc addr, email and site url..
+ missing .gitignore / folder git keepers
2015-07-02 21:17:04 +02:00

28 lines
534 B
PHP

<?php
function bittrex_api_query($method, $params='')
{
$apikey = ''; // your API-key
$apisecret = ''; // your Secret-key
$nonce = time();
$uri = "https://bittrex.com/api/v1.1/$method?apikey=$apikey&nonce=$nonce$params";
$sign = hash_hmac('sha512', $uri, $apisecret);
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("apisign:$sign"));
$execResult = curl_exec($ch);
$obj = json_decode($execResult);
return $obj;
}