From c3d6e0aa3bca4face1a66e2b839a416891f90984 Mon Sep 17 00:00:00 2001 From: WOLF Date: Fri, 10 Jul 2015 08:34:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCTP=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=9B=B8=E5=85=B3DEMO=E6=9F=A5=E8=AF=A2=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=9B=9E=E6=8A=A5=E5=90=8E=E7=9A=84=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1=E8=BF=94=E5=9B=9E=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.demo/ctpdemo/demoApi.py | 13 +++++++------ vn.strategy/strategydemo/demoApi.py | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/vn.demo/ctpdemo/demoApi.py b/vn.demo/ctpdemo/demoApi.py index 032070a7..fddcfb52 100644 --- a/vn.demo/ctpdemo/demoApi.py +++ b/vn.demo/ctpdemo/demoApi.py @@ -477,12 +477,13 @@ class DemoTdApi(TdApi): #---------------------------------------------------------------------- def onRspQrySettlementInfo(self, data, error, n, last): """查询结算信息回报""" - event = Event(type_=EVENT_LOG) - log = u'结算信息查询完成' - event.dict_['log'] = log - self.__eventEngine.put(event) - - self.confirmSettlement() # 查询完成后立即确认结算信息 + if last: + event = Event(type_=EVENT_LOG) + log = u'结算信息查询完成' + event.dict_['log'] = log + self.__eventEngine.put(event) + + self.confirmSettlement() # 查询完成后立即确认结算信息 #---------------------------------------------------------------------- def onRspQryTransferBank(self, data, error, n, last): diff --git a/vn.strategy/strategydemo/demoApi.py b/vn.strategy/strategydemo/demoApi.py index 032070a7..fddcfb52 100644 --- a/vn.strategy/strategydemo/demoApi.py +++ b/vn.strategy/strategydemo/demoApi.py @@ -477,12 +477,13 @@ class DemoTdApi(TdApi): #---------------------------------------------------------------------- def onRspQrySettlementInfo(self, data, error, n, last): """查询结算信息回报""" - event = Event(type_=EVENT_LOG) - log = u'结算信息查询完成' - event.dict_['log'] = log - self.__eventEngine.put(event) - - self.confirmSettlement() # 查询完成后立即确认结算信息 + if last: + event = Event(type_=EVENT_LOG) + log = u'结算信息查询完成' + event.dict_['log'] = log + self.__eventEngine.put(event) + + self.confirmSettlement() # 查询完成后立即确认结算信息 #---------------------------------------------------------------------- def onRspQryTransferBank(self, data, error, n, last):