Commit c9a5b6d5 authored by shajiaiming's avatar shajiaiming

fix

parent 8b7ed8b3
......@@ -30,11 +30,12 @@ class BinanceBuilder extends FactoryService
$temp['symbol'] = $explode_arr[0] . '/' . $coin;
$temp['currency'] = strtoupper($explode_arr[0]);
$temp['base_currency'] = strtoupper($coin);
$temp['close'] = (float)sprintf("%0.6f", $val['lastPrice'] * $this->basic_price[$coin]['usd']);
$temp['close'] = (float)sprintf("%0.6f");
$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['change'] = (float)sprintf("%0.4f", $val['priceChangePercent']);
$temp['high'] = (float)sprintf("%0.4f", $val['highPrice']);
$temp['low'] = (float)sprintf("%0.4f", $val['lowPrice']);
$temp['high_usd'] = (float)sprintf("%0.4f", $val['highPrice'] * $this->basic_price[$coin]['usd']);
$temp['low_usd'] = (float)sprintf("%0.4f", $val['lowPrice'] * $this->basic_price[$coin]['usd']);
$temp['high_rmb'] = (float)sprintf("%0.4f", $val['highPrice'] * $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']);
......
......@@ -30,11 +30,12 @@ class HuobiBuilder extends FactoryService
$temp['symbol'] = strtoupper($explode_arr[0]) . '/' . $coin;
$temp['currency'] = strtoupper($explode_arr[0]);
$temp['base_currency'] = strtoupper($coin);
$temp['close'] = (float)sprintf("%0.6f", $val['close'] * $this->basic_price[$coin]['usd']);
$temp['close'] = (float)sprintf("%0.6f");
$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['change'] = (float)sprintf("%0.4f", ($val['close'] - $val['open']) / $val['open'] * 100);
$temp['high'] = (float)sprintf("%0.4f", $val['high']);
$temp['low'] = (float)sprintf("%0.4f", $val['low']);
$temp['high_usd'] = (float)sprintf("%0.4f", $val['high'] * $this->basic_price[$coin]['usd']);
$temp['low_usd'] = (float)sprintf("%0.4f", $val['low'] * $this->basic_price[$coin]['usd']);
$temp['high_rmb'] = (float)sprintf("%0.4f", $val['high'] * $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']);
......
......@@ -35,10 +35,11 @@ class ZhaobiBuilder extends FactoryService
$temp['currency'] = strtoupper($explode_arr[0]);
$temp['base_currency'] = strtoupper($coin);
$temp['close'] = (float)sprintf("%0.6f", $val['last']);
$temp['close_rmb'] = (float)sprintf("%0.4f", $val['lastrmb']);
$temp['close_usd'] = (float)sprintf("%0.6f", $val['last'] * $this->basic_price[$coin]['usd']);
$temp['close_rmb'] = (float)sprintf("%0.4f", $val['last'] * $this->basic_price[$coin]['rmb']);
$temp['change'] = (float)sprintf("%0.4f", ($val['last'] - $val['open']) / $val['open'] * 100);
$temp['high'] = (float)sprintf("%0.4f", $val['high']);
$temp['low'] = (float)sprintf("%0.4f", $val['low']);
$temp['high_usd'] = (float)sprintf("%0.4f", $val['high'] * $this->basic_price[$coin]['usd']);
$temp['low_usd'] = (float)sprintf("%0.4f", $val['low'] * $this->basic_price[$coin]['usd']);
$temp['high_rmb'] = (float)sprintf("%0.4f", $val['high'] * $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']);
......
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