pool/web/yaamp/core/exchange/bleutrade.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
570 B
PHP

<?php
// same as bittrex
function bleutrade_api_query($method, $params='')
{
$apikey = ''; // your API-key
$apisecret = ''; // your Secret-key
$nonce = time();
$uri = "https://bleutrade.com/api/v2/$method?apikey=$apikey&nonce=$nonce$params";
// debuglog($uri);
$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;
}