Commit 3047fc9e authored by shajiaiming's avatar shajiaiming

火币,币安,找币 行情单独获取

parent 08587677
......@@ -27,7 +27,7 @@ class ExchangeBusiness
*/
private static $exchanges = [
0 => 'Bty',
1 => 'HuoBi',
#1 => 'HuoBi',
2 => 'Hadax',
3 => 'Bitfinex',
4 => 'Bittrex',
......@@ -36,12 +36,12 @@ class ExchangeBusiness
7 => 'S',
8 => 'Zg',
9 => 'Go',
10 => 'Zhaobi',
#10 => 'Zhaobi',
11 => 'Gdpro',
12 => 'Ex',
13 => 'Zt',
14 => 'Tsc',
15 => 'Binance',
#15 => 'Binance',
16 => 'Ceohk',
17 => 'Biki',
18 => 'Bilaxy',
......
......@@ -6,10 +6,11 @@ use common\business\Chain33Business;
use common\models\psources\CoinGameBet;
use common\service\chain33\Chain33Service;
use common\service\exchange\ExchangeBuilderFactory;
use common\service\exchange\ExchangeFactory;
use yii\console\Controller;
use Yii;
class TickerSortController extends Controller
class TickerUpdateController extends Controller
{
/**
* 行情排序
......@@ -20,6 +21,18 @@ class TickerSortController extends Controller
foreach ($class as $val) {
go(function () use ($val) {
\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->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