Commit e03eaab6 authored by shajiaiming's avatar shajiaiming

debug

parent e42f9351
......@@ -68,10 +68,9 @@ class ExchangeBusiness
if('GM' == $tag || 'BSTC' == $tag){
$quotation = $exchange->getTickerToken7($tag, 'HA');
$f = true;
break;
continue;
}
$exchange = ExchangeFactory::createExchange($exchange);
if ($exchange->symbolExists($tag)) {
$quotation = $exchange->getTicker($tag);
$f = true;
......@@ -110,10 +109,15 @@ class ExchangeBusiness
/**
* @var $exchange \common\service\exchange\Exchange
*/
$exchange = ExchangeFactory::createExchange("Bty");
$rate = $exchange->getTicker("BTY", "USDT");
$rate = (float)$rate['rmb'] / $rate['last'];
$quotation['rmb'] = (float)sprintf("%0.2f", $rate * $quotation['last']);
if('GM' == $tag || 'BSTC' == $tag){
$quotation['rmb'] = (float)sprintf("%0.2f", $quotation['last']);
}else{
$exchange = ExchangeFactory::createExchange("Bty");
$rate = $exchange->getTicker("BTY", "USDT");
$rate = (float)$rate['rmb'] / $rate['last'];
$quotation['rmb'] = (float)sprintf("%0.2f", $rate * $quotation['last']);
}
return $quotation;
}
......
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