Update tools.class.php

Added Bittrex support
This commit is contained in:
phoneman13 2014-06-26 20:24:25 -05:00
parent 9057ed0c9b
commit e39d90fffc

View File

@ -81,6 +81,8 @@ class Tools extends Base {
return 'cryptorush';
} else if (preg_match('/mintpal.com/', $url)) {
return 'mintpal';
} else if (preg_match('/bittrex.com/', $url)) {
return 'bittrex';
}
$this->setErrorMessage("API URL unknown");
return false;
@ -116,6 +118,9 @@ class Tools extends Base {
case 'mintpal':
return @$aData['0']['last_price'];
break;
case 'bittrex':
return @$aData['result']['Last'];
break;
}
} else {
$this->setErrorMessage("Got an invalid response from ticker API");