Commit 89fc89b2 authored by ZhuChunYang's avatar ZhuChunYang

添加CCNY行情

parent 12b951f2
......@@ -44,6 +44,16 @@ class ExchangeBusiness
public static function getquatation($tag = 'btc')
{
$coin_quotation_disable_items = Yii::$app->params['coin_quotation_disable_items'];
if(strtoupper($tag) == 'CCNY'){
$exchange = ExchangeFactory::createExchange("Bty");
$rate = $exchange->getTicker("BTY", "USDT");
$rate = (float)$rate['rmb'] / $rate['last'];
$quotation['rmb'] = 1.00;
$quotation['low'] = 1.00;
$quotation['high'] = 1.00;
$quotation['last'] = (float)sprintf("%0.4f", $quotation['rmb']/$rate);
return $quotation;
}
if(in_array($tag,$coin_quotation_disable_items)){
return false;
}
......
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