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
737b1d47
Commit
737b1d47
authored
4 years ago
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lele ticker
parent
581aae61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
18 deletions
+23
-18
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+17
-17
Wbf.php
common/service/exchange/Wbf.php
+6
-1
No files found.
common/business/ExchangeBusiness.php
View file @
737b1d47
...
...
@@ -26,23 +26,23 @@ class ExchangeBusiness
* @var array
*/
private
static
$exchanges
=
[
0
=>
'Bty'
,
1
=>
'HuoBi'
,
2
=>
'Hadax'
,
3
=>
'Bitfinex'
,
4
=>
'Bittrex'
,
5
=>
'Zb'
,
6
=>
'Zg'
,
7
=>
'Go'
,
8
=>
'Zhaobi'
,
9
=>
'Binance'
,
10
=>
'Bilaxy'
,
11
=>
'Bitnasdaq'
,
12
=>
'Isummit'
,
13
=>
'Boc'
,
14
=>
'Jinwang'
,
15
=>
'Hd'
,
16
=>
'Ztb'
,
//
0 => 'Bty',
//
1 => 'HuoBi',
//
2 => 'Hadax',
//
3 => 'Bitfinex',
//
4 => 'Bittrex',
//
5 => 'Zb',
//
6 => 'Zg',
//
7 => 'Go',
//
8 => 'Zhaobi',
//
9 => 'Binance',
//
10 => 'Bilaxy',
//
11 => 'Bitnasdaq',
//
12 => 'Isummit',
//
13 => 'Boc',
//
14 => 'Jinwang',
//
15 => 'Hd',
//
16 => 'Ztb',
17
=>
'Wbf'
//1 => 'Hadax', //不需要
...
...
This diff is collapsed.
Click to expand it.
common/service/exchange/Wbf.php
View file @
737b1d47
...
...
@@ -59,7 +59,12 @@ class Wbf extends Exchange implements ExchangeInterface
$data
=
$res
[
'data'
][
'ticker'
];
foreach
(
$data
as
$item
)
{
$key
=
$this
->
quotation_prefix
.
strtoupper
(
$item
[
'symbol'
]);
$this
->
redis
->
hmset
(
$key
,
'low'
,
$item
[
'low'
],
'high'
,
$item
[
'high'
],
'last'
,
$item
[
'last'
],
'vol'
,
$item
[
'vol'
],
'change'
,
$item
[
'change'
]);
$low
=
isset
(
$item
[
'low'
])
?
$item
[
'low'
]
:
0
;
$high
=
isset
(
$item
[
'high'
])
?
$item
[
'high'
]
:
0
;
$last
=
isset
(
$item
[
'last'
])
?
$item
[
'last'
]
:
0
;
$vol
=
isset
(
$item
[
'vol'
])
?
$item
[
'vol'
]
:
0
;
$change
=
isset
(
$item
[
'change'
])
?
$item
[
'change'
]
:
0
;
$this
->
redis
->
hmset
(
$key
,
'low'
,
$low
,
'high'
,
$high
,
'last'
,
$last
,
'vol'
,
$vol
,
'change'
,
$change
);
if
(
!
$this
->
redis
->
sismember
(
$this
->
supported_symbol
,
strtoupper
(
$item
[
'symbol'
]))){
$this
->
redis
->
sadd
(
$this
->
supported_symbol
,
strtoupper
(
$item
[
'symbol'
]));
}
...
...
This diff is collapsed.
Click to expand it.
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