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
3047fc9e
Commit
3047fc9e
authored
Oct 18, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
火币,币安,找币 行情单独获取
parent
08587677
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 @
3047fc9e
...
...
@@ -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'
,
...
...
console/controllers/Ticker
Sort
Controller.php
→
console/controllers/Ticker
Update
Controller.php
View file @
3047fc9e
...
...
@@ -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
Ticker
Sort
Controller
extends
Controller
class
Ticker
Update
Controller
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
();
});
...
...
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