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
d60bf8e7
Commit
d60bf8e7
authored
Feb 15, 2022
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
fix See merge request
!491
parents
38057608
93e06a7d
Show 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 @
d60bf8e7
...
...
@@ -170,15 +170,6 @@ class ExchangeBusiness
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'
]))
{
$quotation
=
[
'low'
=>
0.01
,
...
...
@@ -293,20 +284,6 @@ class ExchangeBusiness
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'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Ztb"
);
$quotation
=
$exchange
->
getTicker
(
strtoupper
(
$tag
),
'USDT'
);
...
...
@@ -333,9 +310,6 @@ class ExchangeBusiness
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'KPC8'
]))
{
// $exchange = ExchangeFactory::createExchange("Biki");
// $quotation = $exchange->getTicker('KPC8', 'USDT');
// goto doEnd;
$quotation
=
[
'low'
=>
1
,
'high'
=>
1
,
...
...
common/service/exchange/Superx.php
View file @
d60bf8e7
...
...
@@ -60,10 +60,10 @@ class Superx extends Exchange implements ExchangeInterface
if
(
isset
(
$content
[
'msg'
])
&&
'succeed'
==
$content
[
'msg'
])
{
$ticker
=
isset
(
$content
[
'data'
][
'data'
][
'USDT'
])
?
$content
[
'data'
][
'data'
][
'USDT'
]
:
null
;
if
(
false
!=
$ticker
)
{
foreach
(
$ticker
as
$k
ey
=>
$val
)
{
$key
=
$this
->
quotation_prefix
.
strtolower
(
$k
ey
)
.
"usdt"
;
foreach
(
$ticker
as
$k
=>
$val
)
{
$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
->
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