From 80acffd28d3a3ccdec0a8ec35ab2ec56e570c25d Mon Sep 17 00:00:00 2001 From: msincenselee Date: Sat, 3 Jun 2017 20:13:19 +0800 Subject: [PATCH] updated --- vn.trader/gateway/ctpGateway/ctpGateway.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vn.trader/gateway/ctpGateway/ctpGateway.py b/vn.trader/gateway/ctpGateway/ctpGateway.py index 10f303ee..2e789c3f 100644 --- a/vn.trader/gateway/ctpGateway/ctpGateway.py +++ b/vn.trader/gateway/ctpGateway/ctpGateway.py @@ -324,12 +324,10 @@ class CtpMdApi(MdApi): if error['ErrorID'] == 0: self.loginStatus = True self.gateway.mdConnected = True - self.writeLog(text.DATA_SERVER_LOGIN) - # 重新订阅之前订阅的合约 if len(self.subscribedSymbols) > 0: - print u'Resubscribe' + print u'ctpMdApi.onRspUserLogin()Resubscribe Symbols:{0}'.format(self.subscribedSymbols) for subscribeReq in self.subscribedSymbols: self.subscribe(subscribeReq) @@ -571,10 +569,9 @@ class CtpTdApi(TdApi): self.sessionID = str(data['SessionID']) self.loginStatus = True self.gateway.tdConnected = True - + self.gateway.mdConnected = True self.writeLog(text.TRADING_SERVER_LOGIN) - # 确认结算信息 req = {} req['BrokerID'] = self.brokerID