Commit 41e96444 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/ticker' into 'master'

fix See merge request !170
parents 1aa7a3e4 99516fd4
......@@ -32,12 +32,10 @@ class HuobiBuilder extends FactoryService
$api = $this->base_url . '/market/detail?symbol=' . $symbol;
$res = $curl->get($api, false);
if (isset($res['status']) && 'ok' == $res['status']) {
$datas = $res['data'];
foreach ($datas as $item) {
$key = $this->quotation_prefix . $item['symbol'];
$this->redis->hmset($key, 'low', $item['low'], 'high', $item['high'], 'last', $item['close'], 'open', $item['open'], 'vol', $item['vol']);
$this->redis->sadd($this->supported_symbol, $item['symbol']);
}
$key = $this->quotation_prefix . $symbol;
$this->redis->hmset($key, 'low', $res['tick']['low'], 'high', $res['tick']['high'], 'last', $res['tick']['close'], 'open', $res['tick']['open'], 'vol', $res['tick']['
vol']);
$this->redis->sadd($this->supported_symbol, $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