Commit d60bf8e7 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

fix See merge request !491
parents 38057608 93e06a7d
......@@ -170,15 +170,6 @@ class ExchangeBusiness
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,
......@@ -293,20 +284,6 @@ class ExchangeBusiness
goto doEnd;
}
// if (in_array(strtoupper($tag), ['USDT'])) {
// $exchange = ExchangeFactory::createExchange("Go");
// $quotation = $exchange->getTicker('CNY', 'USD');
// $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
// goto doEnd;
// }
//
// if (in_array(strtoupper($tag), ['SUSD'])) {
// $exchange = ExchangeFactory::createExchange("Go");
// $quotation = $exchange->getTicker('CNY', 'USD');
// $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
// goto doEnd;
// }
if (in_array(strtoupper($tag), ['CIC', 'MC'])) {
$exchange = ExchangeFactory::createExchange("Ztb");
$quotation = $exchange->getTicker(strtoupper($tag), 'USDT');
......@@ -333,9 +310,6 @@ class ExchangeBusiness
}
if (in_array(strtoupper($tag), ['KPC8'])) {
// $exchange = ExchangeFactory::createExchange("Biki");
// $quotation = $exchange->getTicker('KPC8', 'USDT');
// goto doEnd;
$quotation = [
'low' => 1,
'high' => 1,
......
......@@ -60,10 +60,10 @@ class Superx extends Exchange implements ExchangeInterface
if (isset($content['msg']) && 'succeed' == $content['msg']) {
$ticker = isset($content['data']['data']['USDT']) ? $content['data']['data']['USDT'] : null;
if (false != $ticker) {
foreach ($ticker as $key => $val) {
$key = $this->quotation_prefix . strtolower($key) . "usdt";
foreach ($ticker as $k => $val) {
$key = $this->quotation_prefix . strtolower($k) . "usdt";
$this->redis->hmset($key, 'low', $val['low'], 'high', $val['high'], 'last', $val['last'], 'open', $val['open'], 'vol', $val['vol'], 'range', str_replace('%', '', $val['range']));
$this->redis->sadd($this->supported_symbol, $val['symbol']);
$this->redis->sadd($this->supported_symbol, strtoupper($k) . 'USDT');
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment