Commit d4407e9e authored by shajiaiming's avatar shajiaiming

usdt ticker

parent ee7ee26d
...@@ -289,9 +289,17 @@ class ExchangeBusiness ...@@ -289,9 +289,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