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
c171a727
Commit
c171a727
authored
Jan 14, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/ticker' into 'master'
xjh ticker See merge request
!276
parents
0e16c28d
1ca154c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+2
-2
Coinka.php
common/service/exchange/Coinka.php
+1
-1
No files found.
common/business/ExchangeBusiness.php
View file @
c171a727
...
...
@@ -220,9 +220,9 @@ class ExchangeBusiness
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'STH'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'STH'
,
'XJH'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Coinka"
);
$quotation
=
$exchange
->
getTicker
(
'sth'
,
'usdt'
);
$quotation
=
$exchange
->
getTicker
(
strtolower
(
$tag
)
,
'usdt'
);
goto
doEnd
;
}
...
...
common/service/exchange/Coinka.php
View file @
c171a727
...
...
@@ -60,7 +60,7 @@ class Coinka extends Exchange implements ExchangeInterface
if
(
is_array
(
$content
)
&&
isset
(
$content
[
'ticker'
]))
{
$data
=
$content
[
'ticker'
];
foreach
(
$data
as
$item
)
{
if
(
in_array
(
strtoupper
(
$item
[
'symbol'
]),
[
'STH_USDT'
]))
{
if
(
in_array
(
strtoupper
(
$item
[
'symbol'
]),
[
'STH_USDT'
,
'XJH_USDT'
]))
{
$data
=
$item
;
$key
=
$this
->
quotation_prefix
.
$item
[
'symbol'
];
$this
->
redis
->
hmset
(
$key
,
'low'
,
$data
[
'low'
],
'high'
,
$data
[
'high'
],
'last'
,
$data
[
'last'
],
'change'
,
$data
[
'change'
],
'vol'
,
$data
[
'vol'
]);
...
...
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