Commit 116cff99 authored by shajiaiming's avatar shajiaiming

fix

parent b9b9175b
......@@ -168,14 +168,16 @@ class TickerController extends BaseController
}
$symbol = explode('/', $val['symbol']);
$tag_first = $symbol[0];
$tag_first = $currency = $symbol[0];
$tag_second = $symbol[1];
if ('BCH' == strtoupper($tag_first)){
$tag_first = 'BCC';
}
$exchange = ExchangeFactory::createExchange($exchange);
$quotation = $exchange->getTicker(strtolower($tag_first), strtolower($tag_second));
if (empty($quotation)) continue;
$temp['symbol'] = $val['symbol'];
$temp['currency'] = strtoupper($tag_first);
$temp['currency'] = strtoupper($currency);
$temp['base_currency'] = strtoupper($tag_second);
$temp['close'] = rtrim(sprintf('%.8f', floatval($quotation['last'])), '0');
$temp['close_usd'] = rtrim(sprintf('%.6f', floatval($quotation['last'] * $this->basic_price[$tag_second]['usd'])), '0');
......
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