Commit 028b48e8 authored by shajiaiming's avatar shajiaiming

fix

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