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
028b48e8
Commit
028b48e8
authored
Dec 05, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
cd7dbc65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+21
-22
Zhaobi.php
common/service/exchange/Zhaobi.php
+2
-1
No files found.
common/business/ExchangeBusiness.php
View file @
028b48e8
...
...
@@ -26,29 +26,28 @@ class ExchangeBusiness
* @var array
*/
private
static
$exchanges
=
[
0
=>
'
Bty
'
,
0
=>
'
Zhaobi
'
,
1
=>
'HuoBi'
,
2
=>
'Hadax'
,
3
=>
'Bitfinex'
,
4
=>
'Bittrex'
,
5
=>
'Zb'
,
6
=>
'Token7'
,
7
=>
'Zg'
,
8
=>
'Go'
,
9
=>
'Zhaobi'
,
10
=>
'Ex'
,
11
=>
'Zt'
,
12
=>
'Tsc'
,
13
=>
'Binance'
,
14
=>
'Biki'
,
15
=>
'Bilaxy'
,
16
=>
'Bitnasdaq'
,
17
=>
'Dag'
,
18
=>
'Boc'
,
19
=>
'Draex'
2
=>
'Token7'
,
3
=>
'Go'
,
4
=>
'Ex'
,
5
=>
'Zt'
,
6
=>
'Tsc'
,
7
=>
'Binance'
,
8
=>
'Bilaxy'
,
9
=>
'Bitnasdaq'
,
10
=>
'Dag'
,
11
=>
'Boc'
,
12
=>
'Draex'
//1 => 'Hadax', //不需要
//2 => 'Bitfinex', //不需要
//3 => 'Bittrex', //不需要
//4 => 'Zb', //不需要
//5 => 'Zg',//不需要
//6 => 'Biki',//不需要
//7 => 'S',//已挂
//
11
=> 'Gdpro',//已挂
//
16
=> 'Ceohk', //已挂
//
7
=> 'Gdpro',//已挂
//
8
=> 'Ceohk', //已挂
];
/**
...
...
@@ -62,7 +61,7 @@ class ExchangeBusiness
{
$coin_quotation_disable_items
=
Yii
::
$app
->
params
[
'coin_quotation_disable_items'
];
if
(
strtoupper
(
$tag
)
==
'CCNY'
||
strtoupper
(
$tag
)
==
'CNYT'
)
{
$exchange
=
ExchangeFactory
::
createExchange
(
"
Bty
"
);
$exchange
=
ExchangeFactory
::
createExchange
(
"
Zhaobi
"
);
$rate
=
$exchange
->
getTicker
(
"BTY"
,
"USDT"
);
$rate
=
(
float
)
$rate
[
'rmb'
]
/
$rate
[
'last'
];
$quotation
[
'rmb'
]
=
1.00
;
...
...
common/service/exchange/Zhaobi.php
View file @
028b48e8
...
...
@@ -24,6 +24,7 @@ class Zhaobi extends Exchange implements ExchangeInterface
}
return
false
;
}
/**
* 转化交易对为请求变量
*
...
...
@@ -63,7 +64,7 @@ class Zhaobi extends Exchange implements ExchangeInterface
}
foreach
(
$ticker_temp
as
$val
)
{
$key
=
$this
->
quotation_prefix
.
strtolower
(
$val
[
'symbol'
]);
$this
->
redis
->
hmset
(
$key
,
'low'
,
$val
[
'low'
],
'high'
,
$val
[
'high'
],
'last'
,
$val
[
'last'
],
'open'
,
$val
[
'open'
],
'vol'
,
$val
[
'vol'
]);
$this
->
redis
->
hmset
(
$key
,
'low'
,
$val
[
'low'
],
'high'
,
$val
[
'high'
],
'last'
,
$val
[
'last'
],
'open'
,
$val
[
'open'
],
'vol'
,
$val
[
'vol'
]
,
'rmb'
,
$val
[
'lastrmb'
]
);
$this
->
redis
->
sadd
(
$this
->
supported_symbol
,
$val
[
'symbol'
]);
}
}
...
...
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