Commit 7882ddce authored by shajiaiming's avatar shajiaiming

fix

parent bb2ed89b
...@@ -16,7 +16,6 @@ class Tsc extends Exchange implements ExchangeInterface ...@@ -16,7 +16,6 @@ class Tsc extends Exchange implements ExchangeInterface
protected $quotation_prefix = 'quotation_tsc_'; protected $quotation_prefix = 'quotation_tsc_';
protected $base_url = 'https://api.tsc100.vip/openapi/quote/v1/ticker/24hr'; protected $base_url = 'https://api.tsc100.vip/openapi/quote/v1/ticker/24hr';
public function symbolExists($tag = 'TSC', $aim = "CNDT") public function symbolExists($tag = 'TSC', $aim = "CNDT")
{ {
$supported = $this->redis->smembers($this->supported_symbol); $supported = $this->redis->smembers($this->supported_symbol);
...@@ -44,7 +43,7 @@ class Tsc extends Exchange implements ExchangeInterface ...@@ -44,7 +43,7 @@ class Tsc extends Exchange implements ExchangeInterface
*/ */
public function setSupportedSymbol() public function setSupportedSymbol()
{ {
$this->redis->sadd($this->supported_symbol, 'TSCCNDT'); $this->redis->sadd($this->supported_symbol, 'TSC_CNDT');
} }
/** /**
...@@ -60,7 +59,7 @@ class Tsc extends Exchange implements ExchangeInterface ...@@ -60,7 +59,7 @@ class Tsc extends Exchange implements ExchangeInterface
foreach ($content as $item) { foreach ($content as $item) {
if (in_array($item['symbol'], ['TSCCNDT'])) { if (in_array($item['symbol'], ['TSCCNDT'])) {
$data = $item; $data = $item;
$key = $this->quotation_prefix . $item['symbol']; $key = $this->quotation_prefix .'TSC_CNDT';
$this->redis->hmset($key, 'low', $data['lowPrice'], 'high', $data['highPrice'], 'last', $data['lastPrice']); $this->redis->hmset($key, 'low', $data['lowPrice'], 'high', $data['highPrice'], 'last', $data['lastPrice']);
$this->redis->sadd($this->supported_symbol, $item['symbol']); $this->redis->sadd($this->supported_symbol, $item['symbol']);
} }
......
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