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
8d915681
Commit
8d915681
authored
Dec 21, 2021
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add klg ticker
parent
dbac8271
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
146 additions
and
7 deletions
+146
-7
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+146
-7
No files found.
common/business/ExchangeBusiness.php
View file @
8d915681
<?php
/**
* Created by PhpStorm.
* User: rlgyzhcn
* Date: 18-6-27
* Time: 下午12:04
*/
namespace
common\business
;
...
...
@@ -33,10 +39,9 @@ class ExchangeBusiness
9
=>
'Bitnasdaq'
,
10
=>
'Isummit'
,
11
=>
'Boc'
,
12
=>
'Jinwang'
,
13
=>
'Ztb'
,
14
=>
'Wbf'
,
15
=>
'Gwa'
12
=>
'Ztb'
,
13
=>
'Wbf'
,
14
=>
'Gwa'
//1 => 'Hadax', //不需要
//2 => 'Bitfinex', //不需要
...
...
@@ -51,10 +56,11 @@ class ExchangeBusiness
//6 => 'Token7',//已挂
//10 => 'Ex',//已挂
//12 => 'Tsc',//已挂
//13 => 'Jinwang',//已挂
//14 => 'Hd',//已挂
//16 => 'Dag',//已挂
//17 => 'Coinka',//已挂
//5 => 'Zg',//已挂
//13 => 'Jinwang',//已挂
//14 => 'Hd',//已挂
];
/**
...
...
@@ -94,6 +100,139 @@ class ExchangeBusiness
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'USAT'
)
{
$tag
=
'USDT'
;
}
if
(
strtoupper
(
$tag
)
==
'DUSDT'
)
{
$quotation
=
[
'low'
=>
6.99
,
'high'
=>
6.99
,
'last'
=>
6.99
,
'rmb'
=>
6.99
,
];
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'YPLUS'
)
{
$quotation
=
[
'low'
=>
10
,
'high'
=>
10
,
'last'
=>
10
,
'rmb'
=>
10
,
];
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'BOSS'
)
{
$quotation
=
[
'low'
=>
2000
,
'high'
=>
2000
,
'last'
=>
2000
,
'rmb'
=>
2000
,
];
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'CPF'
)
{
$quotation
=
[
'low'
=>
3.4
,
'high'
=>
3.4
,
'last'
=>
3.4
,
'rmb'
=>
3.4
,
];
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'FZM'
)
{
$quotation
=
[
'low'
=>
40
,
'high'
=>
40
,
'last'
=>
40
,
'rmb'
=>
40
,
];
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'POKE'
)
{
$quotation
=
[
'low'
=>
0.1621
,
'high'
=>
0.1621
,
'last'
=>
0.1621
,
'rmb'
=>
0.1621
,
];
goto
doEnd
;
}
if
(
strtoupper
(
$tag
)
==
'LHG'
)
{
$quotation
=
[
'low'
=>
0.105
,
'high'
=>
0.105
,
'last'
=>
0.105
,
'rmb'
=>
0.105
,
];
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'LZ'
,
'DTM'
,
'CNNY'
]))
{
$quotation
=
[
'low'
=>
1
,
'high'
=>
1
,
'last'
=>
1
,
'rmb'
=>
1
,
];
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
,
'high'
=>
0.01
,
'last'
=>
0.01
,
'rmb'
=>
0.01
,
];
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'GST'
,
'JNTK'
,
'SPT'
,
'STO'
,
'GM'
,
'BSTC'
,
'RYH'
,
'CNDT'
,
'WL'
,
'ETS'
,
'LIMS'
,
'AT'
,
'BTJ'
,
'WXB'
,
'GFCC'
,
'TNT'
]))
{
$quotation
=
[
'low'
=>
0
,
'high'
=>
0
,
'last'
=>
0
,
'rmb'
=>
0
,
];
goto
doEnd
;
}
if
(
in_array
(
$tag
,
$coin_quotation_disable_items
))
{
return
false
;
}
$f
=
false
;
$quotation
=
[];
if
(
in_array
(
strtoupper
(
$tag
),
[
'LELE'
,
'ZUE'
]))
{
if
(
strtoupper
(
$tag
)
==
'LELE'
)
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Wbf"
);
$quotation
=
$exchange
->
getTicker
(
$tag
,
'USDT'
);
}
if
(
strtoupper
(
$tag
)
==
'ZUE'
)
{
$quotation
=
[
'low'
=>
0.1
,
'high'
=>
0.1
,
'last'
=>
0.1
,
];
}
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'GLCW'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Jinwang"
);
$quotation
=
$exchange
->
getTicker
(
$tag
,
'USDT'
);
...
...
@@ -303,7 +442,7 @@ class ExchangeBusiness
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'GWA'
,
'KLG'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'GWA'
,
'KLG'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Gwa"
);
$quotation
=
$exchange
->
getTicker
(
strtoupper
(
$tag
),
'USDT'
);
goto
doEnd
;
...
...
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