From a44decddbdb71704c918face04255e5b713ce4c2 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 26 Jan 2018 10:24:47 +0800 Subject: [PATCH] =?UTF-8?q?[Add]=E5=A2=9E=E5=8A=A0futuGateway=E7=9A=84?= =?UTF-8?q?=E8=A1=8C=E6=83=85=E6=8E=A8=E9=80=81=E4=B8=AD=E7=9A=84=E5=A7=94?= =?UTF-8?q?=E6=89=98=E4=BB=B7=E6=A0=BC=E9=AB=98=E4=BD=8E=E9=99=90=E5=88=B6?= =?UTF-8?q?=EF=BC=88=E9=9D=9E=E6=B6=A8=E8=B7=8C=E5=81=9C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/gateway/futuGateway/futuGateway.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vnpy/trader/gateway/futuGateway/futuGateway.py b/vnpy/trader/gateway/futuGateway/futuGateway.py index 58bb19ea..a7f6f00b 100644 --- a/vnpy/trader/gateway/futuGateway/futuGateway.py +++ b/vnpy/trader/gateway/futuGateway/futuGateway.py @@ -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)