Cryptsy api support

This commit is contained in:
obigal 2013-07-21 14:14:12 -04:00
parent 9f02359c4c
commit ee2c90525c

View File

@ -48,6 +48,8 @@ class Tools extends Base {
return 'coinchose';
} else if (preg_match('/btc-e.com/', $url)) {
return 'btce';
} else if (preg_match('/cryptsy.com/', $url)) {
return 'cryptsy';
}
$this->setErrorMessage("API URL unknown");
return false;
@ -73,6 +75,9 @@ class Tools extends Base {
case 'btce':
return $aData['ticker']['last'];
break;
case 'cryptsy':
return $aData['return']['markets'][$strCurrency]['lasttradeprice'];
break;
}
// Catchall, we have no data extractor for this API url
$this->setErrorMessage("Undefined API to getPrice() on URL " . $this->config['price']['url']);