Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
6aa9465f
Commit
6aa9465f
authored
Oct 18, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/ticker' into 'master'
火币,币安,找币 行情单独获取 See merge request
!164
parents
763f2497
3047fc9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+3
-3
TickerUpdateController.php
console/controllers/TickerUpdateController.php
+14
-1
No files found.
common/business/ExchangeBusiness.php
View file @
6aa9465f
...
@@ -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'
,
...
...
console/controllers/Ticker
Sort
Controller.php
→
console/controllers/Ticker
Update
Controller.php
View file @
6aa9465f
...
@@ -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
Ticker
Sort
Controller
extends
Controller
class
Ticker
Update
Controller
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
();
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment