Commit a2a02547 authored by shajiaiming's avatar shajiaiming

行情脚本加入vol

parent 894eb0ac
......@@ -42,7 +42,7 @@ class Binance extends Exchange implements ExchangeInterface
if (is_array($res)) {
foreach ($res as $item) {
$key = $this->quotation_prefix . strtolower($item['symbol']);
$this->redis->hmset($key, 'low', $item['lowPrice'], 'high', $item['highPrice'], 'last', $item['lastPrice'], 'open', $item['openPrice']);
$this->redis->hmset($key, 'low', $item['lowPrice'], 'high', $item['highPrice'], 'last', $item['lastPrice'], 'open', $item['openPrice'], 'vol', $item['volume']);
$this->redis->sadd($this->supported_symbol, $item['symbol']);
}
}
......
......@@ -45,7 +45,7 @@ class HuoBi extends Exchange implements ExchangeInterface
$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']);
$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']);
}
}
......
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