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
08e27955
Commit
08e27955
authored
4 years ago
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mc ticker
parent
86f8fc32
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
Ztb.php
common/service/exchange/Ztb.php
+1
-1
No files found.
common/business/ExchangeBusiness.php
View file @
08e27955
...
...
@@ -311,7 +311,7 @@ class ExchangeBusiness
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'CIC'
,
'ZYC'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'CIC'
,
'ZYC'
,
'MC'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Ztb"
);
$quotation
=
$exchange
->
getTicker
(
strtoupper
(
$tag
),
'USDT'
);
goto
doEnd
;
...
...
@@ -460,7 +460,7 @@ class ExchangeBusiness
$exchange
=
ExchangeFactory
::
createExchange
(
"Go"
);
$rate
=
$exchange
->
getTicker
(
"CNY"
,
"USD"
);
$cny_usd_rate
=
1
/
$rate
[
'last'
];
if
(
in_array
(
strtoupper
(
$tag
),
[
'FOLI'
,
'CIC'
,
'ZYC'
,
'KPC8'
,
'BVA'
,
'DAG'
,
'BNC'
,
'GHP'
,
'DRA'
,
'ETC'
,
'PAX'
,
'STH'
,
'XJH'
,
'SFT'
,
'TSC'
,
'SUM'
,
'USDW'
,
'FUT'
,
'MBTC'
,
'METH'
,
'GLCW'
,
'HDC'
,
'LELE'
,
'ZUE'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'FOLI'
,
'CIC'
,
'ZYC'
,
'
MC'
,
'
KPC8'
,
'BVA'
,
'DAG'
,
'BNC'
,
'GHP'
,
'DRA'
,
'ETC'
,
'PAX'
,
'STH'
,
'XJH'
,
'SFT'
,
'TSC'
,
'SUM'
,
'USDW'
,
'FUT'
,
'MBTC'
,
'METH'
,
'GLCW'
,
'HDC'
,
'LELE'
,
'ZUE'
]))
{
$quotation
[
'usd'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]);
$quotation
[
'rmb'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]
/
$cny_usd_rate
);
$quotation
[
'low'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'low'
]);
...
...
This diff is collapsed.
Click to expand it.
common/service/exchange/Ztb.php
View file @
08e27955
...
...
@@ -61,7 +61,7 @@ class Ztb extends Exchange implements ExchangeInterface
if
(
is_array
(
$content
)
&&
isset
(
$content
[
'ticker'
]))
{
$data
=
$content
[
'ticker'
];
foreach
(
$data
as
$item
)
{
if
(
in_array
(
$item
[
'symbol'
],
[
'ZYC_USDT'
]))
{
if
(
in_array
(
$item
[
'symbol'
],
[
'ZYC_USDT'
,
'MC_USDT'
]))
{
$data
=
$item
;
$key
=
$this
->
quotation_prefix
.
str_replace
(
'_'
,
''
,
$item
[
'symbol'
]);
$this
->
redis
->
hmset
(
$key
,
'low'
,
$data
[
'low'
],
'high'
,
$data
[
'high'
],
'last'
,
$data
[
'last'
],
'vol'
,
$data
[
'vol'
],
'change'
,
$data
[
'change'
]);
...
...
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