Cryptsy api support
This commit is contained in:
parent
9f02359c4c
commit
ee2c90525c
@ -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']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user