Merge pull request #155 from li-dp/master

修复OKCoin行情中ask数据异常,非常感谢!
This commit is contained in:
vn.py 2016-10-22 15:06:18 +08:00 committed by GitHub
commit 74fdb1545c

View File

@ -406,11 +406,11 @@ class Api(vnokcoin.OkCoinApi):
tick.bidPrice4, tick.bidVolume4 = rawData['bids'][3] tick.bidPrice4, tick.bidVolume4 = rawData['bids'][3]
tick.bidPrice5, tick.bidVolume5 = rawData['bids'][4] tick.bidPrice5, tick.bidVolume5 = rawData['bids'][4]
tick.askPrice1, tick.askVolume1 = rawData['asks'][0] tick.askPrice1, tick.askVolume1 = rawData['asks'][-1]
tick.askPrice2, tick.askVolume2 = rawData['asks'][1] tick.askPrice2, tick.askVolume2 = rawData['asks'][-2]
tick.askPrice3, tick.askVolume3 = rawData['asks'][2] tick.askPrice3, tick.askVolume3 = rawData['asks'][-3]
tick.askPrice4, tick.askVolume4 = rawData['asks'][3] tick.askPrice4, tick.askVolume4 = rawData['asks'][-4]
tick.askPrice5, tick.askVolume5 = rawData['asks'][4] tick.askPrice5, tick.askVolume5 = rawData['asks'][-5]
newtick = copy(tick) newtick = copy(tick)
self.gateway.onTick(newtick) self.gateway.onTick(newtick)