Commit 904ef54c authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

usdt ticker See merge request !508
parents 47b6815b d4407e9e
...@@ -297,9 +297,17 @@ class ExchangeBusiness ...@@ -297,9 +297,17 @@ class ExchangeBusiness
} }
if (in_array(strtoupper($tag), ['USDT'])) { if (in_array(strtoupper($tag), ['USDT'])) {
$exchange = ExchangeFactory::createExchange("Rate"); // $exchange = ExchangeFactory::createExchange("Rate");
$quotation = $exchange->getTicker("CNY", "USD"); // $quotation = $exchange->getTicker("CNY", "USD");
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']); // $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
$cny_usd_rate_low = Yii::$app->redis_currency->hmget('quotation_currency_USD_CNY', 'low');
$quotation['low'] = (float)sprintf("%0.4f", $cny_usd_rate_low[0]);
$cny_usd_rate_high = Yii::$app->redis_currency->hmget('quotation_currency_USD_CNY', 'high');
$quotation['high'] = (float)sprintf("%0.4f", $cny_usd_rate_high[0]);
$cny_usd_rate_last = Yii::$app->redis_currency->hmget('quotation_currency_USD_CNY', 'last');
$quotation['last'] = $quotation['rmb'] = (float)sprintf("%0.4f", $cny_usd_rate_last[0]);
goto doEnd; goto doEnd;
} }
......
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