Commit 86477424 authored by shajiaming's avatar shajiaming

合并market

parent 33d5fe05
...@@ -59,6 +59,18 @@ class MarketController extends BaseController ...@@ -59,6 +59,18 @@ class MarketController extends BaseController
} }
$exchange = ExchangeFactory::createExchange($exchange); $exchange = ExchangeFactory::createExchange($exchange);
if ('USDT' == strtoupper($base_currency)) {
$currency_ticker = $exchange->getTicker($currency, 'USDT');
if (empty($currency_ticker)){
$this->code = -1;
$this->msg = '此交易所暂不支持所选币种!';
goto doEnd;
}
$this->data = rtrim(sprintf('%.6f',$currency_ticker['last']), '0');
goto doEnd;
}
$currency_ticker = $exchange->getTicker($currency, 'USDT'); $currency_ticker = $exchange->getTicker($currency, 'USDT');
$base_currency_ticker = $exchange->getTicker($base_currency, 'USDT'); $base_currency_ticker = $exchange->getTicker($base_currency, 'USDT');
if (empty($currency_ticker) || empty($base_currency_ticker)) { if (empty($currency_ticker) || empty($base_currency_ticker)) {
......
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