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
Dec 30, 2020
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
...
@@ -26,23 +26,23 @@ class ExchangeBusiness
* @var array
* @var array
*/
*/
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',
5
=>
'Zb'
,
//
5 => 'Zb',
6
=>
'Zg'
,
//
6 => 'Zg',
7
=>
'Go'
,
//
7 => 'Go',
8
=>
'Zhaobi'
,
//
8 => 'Zhaobi',
9
=>
'Binance'
,
//
9 => 'Binance',
10
=>
'Bilaxy'
,
//
10 => 'Bilaxy',
11
=>
'Bitnasdaq'
,
//
11 => 'Bitnasdaq',
12
=>
'Isummit'
,
//
12 => 'Isummit',
13
=>
'Boc'
,
//
13 => 'Boc',
14
=>
'Jinwang'
,
//
14 => 'Jinwang',
15
=>
'Hd'
,
//
15 => 'Hd',
16
=>
'Ztb'
,
//
16 => 'Ztb',
17
=>
'Wbf'
17
=>
'Wbf'
//1 => 'Hadax', //不需要
//1 => 'Hadax', //不需要
...
...
common/service/exchange/Wbf.php
View file @
737b1d47
...
@@ -59,7 +59,12 @@ class Wbf extends Exchange implements ExchangeInterface
...
@@ -59,7 +59,12 @@ class Wbf extends Exchange implements ExchangeInterface
$data
=
$res
[
'data'
][
'ticker'
];
$data
=
$res
[
'data'
][
'ticker'
];
foreach
(
$data
as
$item
)
{
foreach
(
$data
as
$item
)
{
$key
=
$this
->
quotation_prefix
.
strtoupper
(
$item
[
'symbol'
]);
$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'
]))){
if
(
!
$this
->
redis
->
sismember
(
$this
->
supported_symbol
,
strtoupper
(
$item
[
'symbol'
]))){
$this
->
redis
->
sadd
(
$this
->
supported_symbol
,
strtoupper
(
$item
[
'symbol'
]));
$this
->
redis
->
sadd
(
$this
->
supported_symbol
,
strtoupper
(
$item
[
'symbol'
]));
}
}
...
...
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