Commit 6a453f6c authored by shajiaiming's avatar shajiaiming

fix

parent 7e6c5ac3
...@@ -131,12 +131,24 @@ class TickerController extends BaseController ...@@ -131,12 +131,24 @@ class TickerController extends BaseController
$temp['symbol'] = $val['symbol']; $temp['symbol'] = $val['symbol'];
$temp['currency'] = strtoupper($tag_first); $temp['currency'] = strtoupper($tag_first);
$temp['base_currency'] = strtoupper($tag_second); $temp['base_currency'] = strtoupper($tag_second);
$temp['close'] = (float)sprintf("%0.4f", $quotation['last']); $temp['close'] = (float)sprintf("%0.6f", $quotation['last']);
$temp['close_rmb'] = (float)sprintf("%0.4f", $quotation['last'] * $this->basic_price[$tag_second]); $temp['close_usd'] = (float)sprintf("%0.6f", $quotation['close'] * $this->basic_price[$tag_second]['usd']);
$temp['close_rmb'] = (float)sprintf("%0.4f", $quotation['close'] * $this->basic_price[$tag_second]['rmb']);
$temp['change'] = (float)sprintf("%0.4f", ($quotation['last'] - $quotation['open']) / $quotation['open'] * 100); $temp['change'] = (float)sprintf("%0.4f", ($quotation['last'] - $quotation['open']) / $quotation['open'] * 100);
$temp['high'] = (float)sprintf("%0.4f", $quotation['high']); $temp['high_usd'] = (float)sprintf("%0.4f", $quotation['high'] * $this->basic_price[$tag_second]['usd']);
$temp['low'] = (float)sprintf("%0.4f", $quotation['low']); $temp['low_usd'] = (float)sprintf("%0.4f", $quotation['low'] * $this->basic_price[$tag_second]['usd']);
$temp['platform'] = $val['platform']; $temp['high_rmb'] = (float)sprintf("%0.4f", $quotation['high'] * $this->basic_price[$tag_second]['rmb']);
$temp['low_rmb'] = (float)sprintf("%0.4f", $quotation['low'] * $this->basic_price[$tag_second]['rmb']);
$temp['platform_us'] = $val['platform'];
if ('ZHAOBI' == strtoupper($val['platform'])) {
$temp['platform_zh'] = '找币';
}
if ('HUOBI' == strtoupper($val['platform'])) {
$temp['platform_zh'] = '火币';
}
if ('BINANCE' == strtoupper($val['platform'])) {
$temp['platform_zh'] = '币安';
}
array_push($data, $temp); array_push($data, $temp);
} }
$msg = 'success'; $msg = 'success';
......
...@@ -40,6 +40,8 @@ class BinanceBuilder extends FactoryService ...@@ -40,6 +40,8 @@ class BinanceBuilder extends FactoryService
$temp['low_rmb'] = (float)sprintf("%0.4f", $val['lowPrice'] * $this->basic_price[$coin]['rmb']); $temp['low_rmb'] = (float)sprintf("%0.4f", $val['lowPrice'] * $this->basic_price[$coin]['rmb']);
$temp['vol'] = (float)sprintf("%0.4f", $val['volume']); $temp['vol'] = (float)sprintf("%0.4f", $val['volume']);
$temp['optional'] = false; $temp['optional'] = false;
$temp['platform_zh'] = '币安';
$temp['platform_us'] = 'Binance';
array_push($ticker, $temp); array_push($ticker, $temp);
break; break;
} }
......
...@@ -40,6 +40,8 @@ class HuobiBuilder extends FactoryService ...@@ -40,6 +40,8 @@ class HuobiBuilder extends FactoryService
$temp['low_rmb'] = (float)sprintf("%0.4f", $val['low'] * $this->basic_price[$coin]['rmb']); $temp['low_rmb'] = (float)sprintf("%0.4f", $val['low'] * $this->basic_price[$coin]['rmb']);
$temp['vol'] = (float)sprintf("%0.4f", $val['vol']); $temp['vol'] = (float)sprintf("%0.4f", $val['vol']);
$temp['optional'] = false; $temp['optional'] = false;
$temp['platform_zh'] = '火币';
$temp['platform_us'] = 'HuoBi';
array_push($ticker, $temp); array_push($ticker, $temp);
break; break;
} }
......
...@@ -44,6 +44,8 @@ class ZhaobiBuilder extends FactoryService ...@@ -44,6 +44,8 @@ class ZhaobiBuilder extends FactoryService
$temp['low_rmb'] = (float)sprintf("%0.4f", $val['low'] * $this->basic_price[$coin]['rmb']); $temp['low_rmb'] = (float)sprintf("%0.4f", $val['low'] * $this->basic_price[$coin]['rmb']);
$temp['vol'] = (float)sprintf("%0.4f", $val['vol']); $temp['vol'] = (float)sprintf("%0.4f", $val['vol']);
$temp['optional'] = false; $temp['optional'] = false;
$temp['platform_zh'] = '找币';
$temp['platform_us'] = 'Zhaobi';
array_push($ticker, $temp); array_push($ticker, $temp);
break; break;
} }
......
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