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
86477424
Commit
86477424
authored
Feb 12, 2020
by
shajiaming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并market
parent
33d5fe05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
MarketController.php
api/controllers/MarketController.php
+12
-0
No files found.
api/controllers/MarketController.php
View file @
86477424
...
...
@@ -59,6 +59,18 @@ class MarketController extends BaseController
}
$exchange
=
ExchangeFactory
::
createExchange
(
$exchange
);
if
(
'USDT'
==
strtoupper
(
$base_currency
))
{
$currency_ticker
=
$exchange
->
getTicker
(
$currency
,
'USDT'
);
if
(
empty
(
$currency_ticker
)){
$this
->
code
=
-
1
;
$this
->
msg
=
'此交易所暂不支持所选币种!'
;
goto
doEnd
;
}
$this
->
data
=
rtrim
(
sprintf
(
'%.6f'
,
$currency_ticker
[
'last'
]),
'0'
);
goto
doEnd
;
}
$currency_ticker
=
$exchange
->
getTicker
(
$currency
,
'USDT'
);
$base_currency_ticker
=
$exchange
->
getTicker
(
$base_currency
,
'USDT'
);
if
(
empty
(
$currency_ticker
)
||
empty
(
$base_currency_ticker
))
{
...
...
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