From 77687d971344c503710820b10c067ca35f580ce9 Mon Sep 17 00:00:00 2001 From: Brian Ziemek Date: Sun, 18 Mar 2018 02:50:23 -0400 Subject: [PATCH] Add Mercatox ticker API --- include/classes/tools.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/classes/tools.class.php b/include/classes/tools.class.php index 0a4c9125..13e983aa 100644 --- a/include/classes/tools.class.php +++ b/include/classes/tools.class.php @@ -93,6 +93,8 @@ class Tools extends Base { 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; @@ -149,6 +151,9 @@ class Tools extends Base { case 'southxchange': return @$aData['Last']; break; + case 'mercatox': + return @$aData["{$strBase}_{$strQuote}"]['last']; + break; } } else { $this->setErrorMessage("Got an invalid response from ticker API");