Skip to content

Commit 6cc9cba

Browse files
authored
Add SouthXChange ticker API
1 parent 79d9d08 commit 6cc9cba

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
@@ -91,6 +91,8 @@ private function getApiType($url) {
9191
return 'yobit';
9292
} else if (preg_match('/binance.com/', $url)) {
9393
return 'binance';
94+
} else if (preg_match('/southxchange.com/', $url)) {
95+
return 'southxchange';
9496
}
9597
$this->setErrorMessage("API URL unknown");
9698
return false;
@@ -144,6 +146,9 @@ public function getPrice() {
144146
case 'binance':
145147
return @$aData['price'];
146148
break;
149+
case 'southxchange':
150+
return @$aData['Last'];
151+
break;
147152
}
148153
} else {
149154
$this->setErrorMessage("Got an invalid response from ticker API");

0 commit comments

Comments
 (0)