Commit 248f60e5 authored by shajiaiming's avatar shajiaiming

fix

parent dca24765
...@@ -30,7 +30,7 @@ class BinanceBuilder extends FactoryService ...@@ -30,7 +30,7 @@ class BinanceBuilder extends FactoryService
$temp['symbol'] = $explode_arr[0] . '/' . $coin; $temp['symbol'] = $explode_arr[0] . '/' . $coin;
$temp['currency'] = strtoupper($explode_arr[0]); $temp['currency'] = strtoupper($explode_arr[0]);
$temp['base_currency'] = strtoupper($coin); $temp['base_currency'] = strtoupper($coin);
$temp['close'] = (float)sprintf("%0.6f", $val['lastPrice']); $temp['close'] = number_format($val['lastPrice'], 6, '.', '');
$temp['close_usd'] = (float)sprintf("%0.6f", $val['lastPrice'] * $this->basic_price[$coin]['usd']); $temp['close_usd'] = (float)sprintf("%0.6f", $val['lastPrice'] * $this->basic_price[$coin]['usd']);
$temp['close_rmb'] = (float)sprintf("%0.4f", $val['lastPrice'] * $this->basic_price[$coin]['rmb']); $temp['close_rmb'] = (float)sprintf("%0.4f", $val['lastPrice'] * $this->basic_price[$coin]['rmb']);
$temp['change'] = (float)sprintf("%0.4f", $val['priceChangePercent']); $temp['change'] = (float)sprintf("%0.4f", $val['priceChangePercent']);
......
...@@ -30,7 +30,7 @@ class HuobiBuilder extends FactoryService ...@@ -30,7 +30,7 @@ class HuobiBuilder extends FactoryService
$temp['symbol'] = strtoupper($explode_arr[0]) . '/' . $coin; $temp['symbol'] = strtoupper($explode_arr[0]) . '/' . $coin;
$temp['currency'] = strtoupper($explode_arr[0]); $temp['currency'] = strtoupper($explode_arr[0]);
$temp['base_currency'] = strtoupper($coin); $temp['base_currency'] = strtoupper($coin);
$temp['close'] = (float)sprintf("%0.6f", $val['close']); $temp['close'] = number_format($val['close'], 6, '.', '');
$temp['close_usd'] = (float)sprintf("%0.6f", $val['close'] * $this->basic_price[$coin]['usd']); $temp['close_usd'] = (float)sprintf("%0.6f", $val['close'] * $this->basic_price[$coin]['usd']);
$temp['close_rmb'] = (float)sprintf("%0.4f", $val['close'] * $this->basic_price[$coin]['rmb']); $temp['close_rmb'] = (float)sprintf("%0.4f", $val['close'] * $this->basic_price[$coin]['rmb']);
$temp['change'] = (float)sprintf("%0.4f", ($val['close'] - $val['open']) / $val['open'] * 100); $temp['change'] = (float)sprintf("%0.4f", ($val['close'] - $val['open']) / $val['open'] * 100);
......
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