Add TradeOgre ticker API

This commit is contained in:
Brian Ziemek 2018-03-18 03:40:49 -04:00 committed by GitHub
parent 77687d9713
commit 6ff468a152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,8 @@ class Tools extends Base {
return 'southxchange';
} else if (preg_match('/mercatox.com/', $url)) {
return 'mercatox';
} else if (preg_match('/tradeogre.com/', $url)) {
return 'tradeogre';
}
$this->setErrorMessage("API URL unknown");
return false;
@ -154,6 +156,9 @@ class Tools extends Base {
case 'mercatox':
return @$aData["{$strBase}_{$strQuote}"]['last'];
break;
case 'tradeogre':
return @$aData['price'];
break;
}
} else {
$this->setErrorMessage("Got an invalid response from ticker API");