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
f3581a73
Commit
f3581a73
authored
Oct 30, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new ticker
parent
ec517a6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+7
-1
Jinwang.php
common/service/exchange/Jinwang.php
+1
-1
No files found.
common/business/ExchangeBusiness.php
View file @
f3581a73
...
...
@@ -175,6 +175,12 @@ class ExchangeBusiness
}
$f
=
false
;
$quotation
=
[];
if
(
in_array
(
strtoupper
(
$tag
),
[
'GLCW'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Jinwang"
);
$quotation
=
$exchange
->
getTicker
(
$tag
,
'USDT'
);
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'SUM'
,
'USDW'
,
'FUT'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Isummit"
);
$quotation
=
$exchange
->
getTicker
(
$tag
,
'USDT'
);
...
...
@@ -390,7 +396,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'
,
'KPC8'
,
'BVA'
,
'DAG'
,
'BNC'
,
'GHP'
,
'DRA'
,
'ETC'
,
'PAX'
,
'STH'
,
'XJH'
,
'SFT'
,
'TSC'
,
'SUM'
,
'USDW'
,
'FUT'
,
'MBTC'
,
'METH'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'FOLI'
,
'CIC'
,
'KPC8'
,
'BVA'
,
'DAG'
,
'BNC'
,
'GHP'
,
'DRA'
,
'ETC'
,
'PAX'
,
'STH'
,
'XJH'
,
'SFT'
,
'TSC'
,
'SUM'
,
'USDW'
,
'FUT'
,
'MBTC'
,
'METH'
,
'GLCW'
]))
{
$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'
]);
...
...
common/service/exchange/Jinwang.php
View file @
f3581a73
...
...
@@ -34,7 +34,7 @@ class Jinwang extends Exchange implements ExchangeInterface
*/
public
function
formatSymbol
(
$tag
=
'TG'
,
$aim
=
'USDT'
)
{
return
strto
upper
(
$tag
.
$aim
);
return
strto
lower
(
$tag
.
'_'
.
$aim
);
}
/**
...
...
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