Commit 6aa9465f authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/ticker' into 'master'

火币,币安,找币 行情单独获取 See merge request !164
parents 763f2497 3047fc9e
...@@ -27,7 +27,7 @@ class ExchangeBusiness ...@@ -27,7 +27,7 @@ class ExchangeBusiness
*/ */
private static $exchanges = [ private static $exchanges = [
0 => 'Bty', 0 => 'Bty',
1 => 'HuoBi', #1 => 'HuoBi',
2 => 'Hadax', 2 => 'Hadax',
3 => 'Bitfinex', 3 => 'Bitfinex',
4 => 'Bittrex', 4 => 'Bittrex',
...@@ -36,12 +36,12 @@ class ExchangeBusiness ...@@ -36,12 +36,12 @@ class ExchangeBusiness
7 => 'S', 7 => 'S',
8 => 'Zg', 8 => 'Zg',
9 => 'Go', 9 => 'Go',
10 => 'Zhaobi', #10 => 'Zhaobi',
11 => 'Gdpro', 11 => 'Gdpro',
12 => 'Ex', 12 => 'Ex',
13 => 'Zt', 13 => 'Zt',
14 => 'Tsc', 14 => 'Tsc',
15 => 'Binance', #15 => 'Binance',
16 => 'Ceohk', 16 => 'Ceohk',
17 => 'Biki', 17 => 'Biki',
18 => 'Bilaxy', 18 => 'Bilaxy',
......
...@@ -6,10 +6,11 @@ use common\business\Chain33Business; ...@@ -6,10 +6,11 @@ use common\business\Chain33Business;
use common\models\psources\CoinGameBet; use common\models\psources\CoinGameBet;
use common\service\chain33\Chain33Service; use common\service\chain33\Chain33Service;
use common\service\exchange\ExchangeBuilderFactory; use common\service\exchange\ExchangeBuilderFactory;
use common\service\exchange\ExchangeFactory;
use yii\console\Controller; use yii\console\Controller;
use Yii; use Yii;
class TickerSortController extends Controller class TickerUpdateController extends Controller
{ {
/** /**
* 行情排序 * 行情排序
...@@ -20,6 +21,18 @@ class TickerSortController extends Controller ...@@ -20,6 +21,18 @@ class TickerSortController extends Controller
foreach ($class as $val) { foreach ($class as $val) {
go(function () use ($val) { go(function () use ($val) {
\Co::sleep(0.5); \Co::sleep(0.5);
$exchange = ExchangeFactory::createExchange($val);
$exchange->setQuotation();
});
}
}
public function actionSort()
{
$class = ['Binance', 'Huobi', 'Zhaobi'];
foreach ($class as $val) {
go(function () use ($val) {
\Co::sleep(0.5);
$ticker_builder = ExchangeBuilderFactory::create($val); $ticker_builder = ExchangeBuilderFactory::create($val);
$ticker_builder->TickerSort(); $ticker_builder->TickerSort();
}); });
......
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