Skip to content

Commit 1cd2f63

Browse files
committed
Merge pull request #2481 from reappergrimd/patch-1
Added cryptopia Api Call
2 parents 3ab9f6a + e15695e commit 1cd2f63

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
@@ -77,6 +77,8 @@ private function getApiType($url) {
7777
return 'btce';
7878
} else if (preg_match('/cryptsy.com/', $url)) {
7979
return 'cryptsy';
80+
} else if (preg_match('/cryptopia.co.nz/', $url)) {
81+
return 'cryptopia';
8082
} else if (preg_match('/cryptorush.in/', $url)) {
8183
return 'cryptorush';
8284
} else if (preg_match('/mintpal.com/', $url)) {
@@ -112,6 +114,9 @@ public function getPrice() {
112114
case 'cryptsy':
113115
return @$aData['return']['markets'][$strCurrency]['lasttradeprice'];
114116
break;
117+
case 'cryptopia':
118+
return @$aData['Data']['LastPrice'];
119+
break;
115120
case 'cryptorush':
116121
return @$aData["$strCurrency/" . $this->config['price']['currency']]['last_trade'];
117122
break;

0 commit comments

Comments
 (0)