pool/web/yaamp/core/exchange/cryptopia.php
Tanguy Pruvot ccd8bed2e6 monitor the right webserver and new exchanges
Added cryptopia ticker, and prepare alcurex functions...
2015-07-14 09:29:10 +02:00

19 lines
382 B
PHP

<?php
// https://www.cryptopia.co.nz/api/GetMarkets/24
function cryptopia_api_query($method, $params='')
{
$uri = "https://www.cryptopia.co.nz/api/$method";
if (!empty($params))
$uri .= "/$params";
// debuglog("$uri");
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$execResult = curl_exec($ch);
$obj = json_decode($execResult);
return $obj;
}