From f59ed6b1522050f77083a2e57eb2b846d5dd89b3 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 23 Oct 2017 13:46:51 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8D=E9=A3=9E=E5=88=9B?= =?UTF-8?q?=E6=9C=9F=E6=9D=83=E5=90=88=E7=BA=A6=E6=9F=A5=E8=AF=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=AF=8C=E9=80=94=E8=AF=81=E5=88=B8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=80=80=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/VnTrader/data/TRADE_MARKET_110100001088sop.dat | 1 + examples/VnTrader/data/TRADE_MARKET_110100001088stock.dat | 2 +- vnpy/trader/gateway/futuGateway/futuGateway.py | 6 ++++-- vnpy/trader/gateway/secGateway/secGateway.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 examples/VnTrader/data/TRADE_MARKET_110100001088sop.dat diff --git a/examples/VnTrader/data/TRADE_MARKET_110100001088sop.dat b/examples/VnTrader/data/TRADE_MARKET_110100001088sop.dat new file mode 100644 index 00000000..1705e20c --- /dev/null +++ b/examples/VnTrader/data/TRADE_MARKET_110100001088sop.dat @@ -0,0 +1 @@ +v0yuhbdjKS4ZfL61IX4zXw== \ No newline at end of file diff --git a/examples/VnTrader/data/TRADE_MARKET_110100001088stock.dat b/examples/VnTrader/data/TRADE_MARKET_110100001088stock.dat index ee0abefc..8b63299c 100644 --- a/examples/VnTrader/data/TRADE_MARKET_110100001088stock.dat +++ b/examples/VnTrader/data/TRADE_MARKET_110100001088stock.dat @@ -1 +1 @@ -o/qNWiWU4xYqVMOeeIVgnQ== \ No newline at end of file +GiYAgGqqW99wdcqcciwrbQ== \ No newline at end of file diff --git a/vnpy/trader/gateway/futuGateway/futuGateway.py b/vnpy/trader/gateway/futuGateway/futuGateway.py index 71635890..ab672443 100644 --- a/vnpy/trader/gateway/futuGateway/futuGateway.py +++ b/vnpy/trader/gateway/futuGateway/futuGateway.py @@ -353,8 +353,10 @@ class FutuGateway(VtGateway): #---------------------------------------------------------------------- def close(self): """关闭""" - self.quoteCtx.stop() - self.tradeCtx.stop() + if self.quoteCtx: + self.quoteCtx.stop() + if self.tradeCtx: + self.tradeCtx.stop() #---------------------------------------------------------------------- def initQuery(self): diff --git a/vnpy/trader/gateway/secGateway/secGateway.py b/vnpy/trader/gateway/secGateway/secGateway.py index f63f667e..c1f3f005 100644 --- a/vnpy/trader/gateway/secGateway/secGateway.py +++ b/vnpy/trader/gateway/secGateway/secGateway.py @@ -1066,7 +1066,7 @@ class SecTdApi(TdApi): log.logContent = u'期权交易服务器登录完成' self.gateway.onLog(log) - #self.qryOptionContracts() + self.qryOptionContracts() # 否则,推送错误信息 else: