Commit 6c299723 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/ticker' into 'master'

pax ticker See merge request !263
parents 30867139 e8e9bf48
......@@ -127,6 +127,12 @@ class ExchangeBusiness
}
$f = false;
$quotation = [];
if (in_array(strtoupper($tag), ['PAX'])) {
$exchange = ExchangeFactory::createExchange("HuoBi");
$quotation = $exchange->getTicker($tag, 'husd');
goto doEnd;
}
if (in_array(strtoupper($tag), ['DRA'])) {
$exchange = ExchangeFactory::createExchange("Draex");
$quotation = $exchange->getTicker($tag, 'USDT');
......@@ -314,7 +320,7 @@ class ExchangeBusiness
$exchange = ExchangeFactory::createExchange("Go");
$rate = $exchange->getTicker("CNY", "USD");
$cny_usd_rate = 1 / $rate['last'];
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC'])) {
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX'])) {
$quotation['usd'] = (float)sprintf("%0.4f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last'] / $cny_usd_rate);
} else if (in_array(strtoupper($tag), ['SUSD'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment