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
93e06a7d
Commit
93e06a7d
authored
Feb 15, 2022
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
22e15b07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
29 deletions
+3
-29
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+0
-26
Superx.php
common/service/exchange/Superx.php
+3
-3
No files found.
common/business/ExchangeBusiness.php
View file @
93e06a7d
...
@@ -170,15 +170,6 @@ class ExchangeBusiness
...
@@ -170,15 +170,6 @@ class ExchangeBusiness
goto
doEnd
;
goto
doEnd
;
}
}
// if (strtoupper($tag) == 'ZUE') {
// $quotation = [
// 'low' => 0.1,
// 'high' => 0.1,
// 'last' => 0.1,
// ];
// goto doEnd;
// }
if
(
in_array
(
strtoupper
(
$tag
),
[
'SZHB'
,
'FK'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'SZHB'
,
'FK'
]))
{
$quotation
=
[
$quotation
=
[
'low'
=>
0.01
,
'low'
=>
0.01
,
...
@@ -293,20 +284,6 @@ class ExchangeBusiness
...
@@ -293,20 +284,6 @@ class ExchangeBusiness
goto
doEnd
;
goto
doEnd
;
}
}
// if (in_array(strtoupper($tag), ['USDT'])) {
// $exchange = ExchangeFactory::createExchange("Go");
// $quotation = $exchange->getTicker('CNY', 'USD');
// $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
// goto doEnd;
// }
//
// if (in_array(strtoupper($tag), ['SUSD'])) {
// $exchange = ExchangeFactory::createExchange("Go");
// $quotation = $exchange->getTicker('CNY', 'USD');
// $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
// goto doEnd;
// }
if
(
in_array
(
strtoupper
(
$tag
),
[
'CIC'
,
'MC'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'CIC'
,
'MC'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Ztb"
);
$exchange
=
ExchangeFactory
::
createExchange
(
"Ztb"
);
$quotation
=
$exchange
->
getTicker
(
strtoupper
(
$tag
),
'USDT'
);
$quotation
=
$exchange
->
getTicker
(
strtoupper
(
$tag
),
'USDT'
);
...
@@ -333,9 +310,6 @@ class ExchangeBusiness
...
@@ -333,9 +310,6 @@ class ExchangeBusiness
}
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'KPC8'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'KPC8'
]))
{
// $exchange = ExchangeFactory::createExchange("Biki");
// $quotation = $exchange->getTicker('KPC8', 'USDT');
// goto doEnd;
$quotation
=
[
$quotation
=
[
'low'
=>
1
,
'low'
=>
1
,
'high'
=>
1
,
'high'
=>
1
,
...
...
common/service/exchange/Superx.php
View file @
93e06a7d
...
@@ -60,10 +60,10 @@ class Superx extends Exchange implements ExchangeInterface
...
@@ -60,10 +60,10 @@ class Superx extends Exchange implements ExchangeInterface
if
(
isset
(
$content
[
'msg'
])
&&
'succeed'
==
$content
[
'msg'
])
{
if
(
isset
(
$content
[
'msg'
])
&&
'succeed'
==
$content
[
'msg'
])
{
$ticker
=
isset
(
$content
[
'data'
][
'data'
][
'USDT'
])
?
$content
[
'data'
][
'data'
][
'USDT'
]
:
null
;
$ticker
=
isset
(
$content
[
'data'
][
'data'
][
'USDT'
])
?
$content
[
'data'
][
'data'
][
'USDT'
]
:
null
;
if
(
false
!=
$ticker
)
{
if
(
false
!=
$ticker
)
{
foreach
(
$ticker
as
$k
ey
=>
$val
)
{
foreach
(
$ticker
as
$k
=>
$val
)
{
$key
=
$this
->
quotation_prefix
.
strtolower
(
$k
ey
)
.
"usdt"
;
$key
=
$this
->
quotation_prefix
.
strtolower
(
$k
)
.
"usdt"
;
$this
->
redis
->
hmset
(
$key
,
'low'
,
$val
[
'low'
],
'high'
,
$val
[
'high'
],
'last'
,
$val
[
'last'
],
'open'
,
$val
[
'open'
],
'vol'
,
$val
[
'vol'
],
'range'
,
str_replace
(
'%'
,
''
,
$val
[
'range'
]));
$this
->
redis
->
hmset
(
$key
,
'low'
,
$val
[
'low'
],
'high'
,
$val
[
'high'
],
'last'
,
$val
[
'last'
],
'open'
,
$val
[
'open'
],
'vol'
,
$val
[
'vol'
],
'range'
,
str_replace
(
'%'
,
''
,
$val
[
'range'
]));
$this
->
redis
->
sadd
(
$this
->
supported_symbol
,
$val
[
'symbol'
]
);
$this
->
redis
->
sadd
(
$this
->
supported_symbol
,
strtoupper
(
$k
)
.
'USDT'
);
}
}
}
}
}
}
...
...
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