Commit 7827707f authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/ticker' into 'master'

new coin ticker See merge request !394
parents 260049a9 5d5dc0aa
......@@ -306,6 +306,17 @@ class ExchangeBusiness
goto doEnd;
}
if (in_array(strtoupper($tag), ['MBTC', 'METH'])) {
$exchange = ExchangeFactory::createExchange("HuoBi");
if ('MBTC' == $tag) {
$quotation = $exchange->getTicker('btc', 'usdt');
}
if ('METH' == $tag) {
$quotation = $exchange->getTicker('eth', 'usdt');
}
goto doEnd;
}
if (in_array(strtoupper($tag), ['SJPY'])) {
$exchange = ExchangeFactory::createExchange("Boc");
$quotation = $exchange->getTicker('CNY', 'JPY');
......@@ -375,7 +386,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', 'PAX', 'STH', 'XJH', 'SFT', 'TSC', 'SUM', 'USDW', 'FUT'])) {
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX', 'STH', 'XJH', 'SFT', 'TSC', 'SUM', 'USDW', 'FUT', 'MBTC', 'METH'])) {
$quotation['usd'] = (float)sprintf("%0.4f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last'] / $cny_usd_rate);
$quotation['low'] = (float)sprintf("%0.4f", $quotation['low']);
......
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