Commit 028b48e8 authored by shajiaiming's avatar shajiaiming

fix

parent cd7dbc65
......@@ -26,29 +26,28 @@ class ExchangeBusiness
* @var array
*/
private static $exchanges = [
0 => 'Bty',
0 => 'Zhaobi',
1 => 'HuoBi',
2 => 'Hadax',
3 => 'Bitfinex',
4 => 'Bittrex',
5 => 'Zb',
6 => 'Token7',
7 => 'Zg',
8 => 'Go',
9 => 'Zhaobi',
10 => 'Ex',
11 => 'Zt',
12 => 'Tsc',
13 => 'Binance',
14 => 'Biki',
15 => 'Bilaxy',
16 => 'Bitnasdaq',
17 => 'Dag',
18 => 'Boc',
19 => 'Draex'
2 => 'Token7',
3 => 'Go',
4 => 'Ex',
5 => 'Zt',
6 => 'Tsc',
7 => 'Binance',
8 => 'Bilaxy',
9 => 'Bitnasdaq',
10 => 'Dag',
11 => 'Boc',
12 => 'Draex'
//1 => 'Hadax', //不需要
//2 => 'Bitfinex', //不需要
//3 => 'Bittrex', //不需要
//4 => 'Zb', //不需要
//5 => 'Zg',//不需要
//6 => 'Biki',//不需要
//7 => 'S',//已挂
//11 => 'Gdpro',//已挂
//16 => 'Ceohk', //已挂
//7 => 'Gdpro',//已挂
//8 => 'Ceohk', //已挂
];
/**
......@@ -62,7 +61,7 @@ class ExchangeBusiness
{
$coin_quotation_disable_items = Yii::$app->params['coin_quotation_disable_items'];
if (strtoupper($tag) == 'CCNY' || strtoupper($tag) == 'CNYT') {
$exchange = ExchangeFactory::createExchange("Bty");
$exchange = ExchangeFactory::createExchange("Zhaobi");
$rate = $exchange->getTicker("BTY", "USDT");
$rate = (float)$rate['rmb'] / $rate['last'];
$quotation['rmb'] = 1.00;
......
......@@ -24,6 +24,7 @@ class Zhaobi extends Exchange implements ExchangeInterface
}
return false;
}
/**
* 转化交易对为请求变量
*
......@@ -63,7 +64,7 @@ class Zhaobi extends Exchange implements ExchangeInterface
}
foreach ($ticker_temp as $val) {
$key = $this->quotation_prefix . strtolower($val['symbol']);
$this->redis->hmset($key, 'low', $val['low'], 'high', $val['high'], 'last', $val['last'], 'open', $val['open'], 'vol', $val['vol']);
$this->redis->hmset($key, 'low', $val['low'], 'high', $val['high'], 'last', $val['last'], 'open', $val['open'], 'vol', $val['vol'], 'rmb', $val['lastrmb']);
$this->redis->sadd($this->supported_symbol, $val['symbol']);
}
}
......
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