[Add]增加futuGateway的行情推送中的委托价格高低限制(非涨跌停)

This commit is contained in:
vn.py 2018-01-26 10:24:47 +08:00
parent 948f081441
commit a44decddbd

View File

@ -440,6 +440,11 @@ class FutuGateway(VtGateway):
tick.lastPrice = row['last_price']
tick.volume = row['volume']
if 'price_spread' in row:
spread = row['price_spread']
tick.upperLimit = tick.lastPrice + spread * 10
tick.lowerLimit = tick.lastPrice - spread * 10
newTick = copy(tick)
self.onTick(newTick)