[Add]增加futuGateway的行情推送中的委托价格高低限制(非涨跌停)
This commit is contained in:
parent
948f081441
commit
a44decddbd
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user