Add Crypto-Bridge ticker API
This commit is contained in:
parent
8f33ceb3a4
commit
0dbb4d8bc9
@ -85,6 +85,8 @@ class Tools extends Base {
|
|||||||
return 'c-cex';
|
return 'c-cex';
|
||||||
} else if (preg_match('/bittrex.com/', $url)) {
|
} else if (preg_match('/bittrex.com/', $url)) {
|
||||||
return 'bittrex';
|
return 'bittrex';
|
||||||
|
} else if (preg_match('/crypto-bridge.org/', $url)) {
|
||||||
|
return 'cryptobridge';
|
||||||
}
|
}
|
||||||
$this->setErrorMessage("API URL unknown");
|
$this->setErrorMessage("API URL unknown");
|
||||||
return false;
|
return false;
|
||||||
@ -127,6 +129,11 @@ class Tools extends Base {
|
|||||||
case 'bittrex':
|
case 'bittrex':
|
||||||
return @$aData['result']['Last'];
|
return @$aData['result']['Last'];
|
||||||
break;
|
break;
|
||||||
|
case 'cryptobridge':
|
||||||
|
foreach ($aData as $aItem) {
|
||||||
|
if("{$strBase}_{$strQuote}" == $aItem['id'])
|
||||||
|
return $aItem['last'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->setErrorMessage("Got an invalid response from ticker API");
|
$this->setErrorMessage("Got an invalid response from ticker API");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user