Commit 1ca154c2 authored by shajiaiming's avatar shajiaiming

xjh ticker

parent 0e16c28d
......@@ -220,9 +220,9 @@ class ExchangeBusiness
goto doEnd;
}
if (in_array(strtoupper($tag), ['STH'])) {
if (in_array(strtoupper($tag), ['STH', 'XJH'])) {
$exchange = ExchangeFactory::createExchange("Coinka");
$quotation = $exchange->getTicker('sth', 'usdt');
$quotation = $exchange->getTicker(strtolower($tag), 'usdt');
goto doEnd;
}
......
......@@ -60,7 +60,7 @@ class Coinka extends Exchange implements ExchangeInterface
if (is_array($content) && isset($content['ticker'])) {
$data = $content['ticker'];
foreach ($data as $item) {
if (in_array(strtoupper($item['symbol']), ['STH_USDT'])) {
if (in_array(strtoupper($item['symbol']), ['STH_USDT', 'XJH_USDT'])) {
$data = $item;
$key = $this->quotation_prefix . $item['symbol'];
$this->redis->hmset($key, 'low', $data['low'], 'high', $data['high'], 'last', $data['last'], 'change', $data['change'], 'vol', $data['vol']);
......
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