Add Mercatox ticker API

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

View File

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