Skip to content

Commit 77687d9

Browse files
authored
Add Mercatox ticker API
1 parent 6cc9cba commit 77687d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/classes/tools.class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ private function getApiType($url) {
9393
return 'binance';
9494
} else if (preg_match('/southxchange.com/', $url)) {
9595
return 'southxchange';
96+
} else if (preg_match('/mercatox.com/', $url)) {
97+
return 'mercatox';
9698
}
9799
$this->setErrorMessage("API URL unknown");
98100
return false;
@@ -149,6 +151,9 @@ public function getPrice() {
149151
case 'southxchange':
150152
return @$aData['Last'];
151153
break;
154+
case 'mercatox':
155+
return @$aData["{$strBase}_{$strQuote}"]['last'];
156+
break;
152157
}
153158
} else {
154159
$this->setErrorMessage("Got an invalid response from ticker API");

0 commit comments

Comments
 (0)