Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More tickers #2700

Merged
merged 13 commits into from
Mar 18, 2018
Prev Previous commit
Next Next commit
Add Mercatox ticker API
  • Loading branch information
bziemek authored Mar 18, 2018
commit 77687d971344c503710820b10c067ca35f580ce9
5 changes: 5 additions & 0 deletions include/classes/tools.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ private function getApiType($url) {
return 'binance';
} else if (preg_match('/southxchange.com/', $url)) {
return 'southxchange';
} else if (preg_match('/mercatox.com/', $url)) {
return 'mercatox';
}
$this->setErrorMessage("API URL unknown");
return false;
Expand Down Expand Up @@ -149,6 +151,9 @@ public function getPrice() {
case 'southxchange':
return @$aData['Last'];
break;
case 'mercatox':
return @$aData["{$strBase}_{$strQuote}"]['last'];
break;
}
} else {
$this->setErrorMessage("Got an invalid response from ticker API");
Expand Down