diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index 32959767..c69bb1d5 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -156,14 +156,14 @@ class CtpGateway(BaseGateway): product_info = setting["产品信息"] if ( - (not td_address.startswith("tcp://")) and - (not td_address.startswith("ssl://")) + (not td_address.startswith("tcp://")) + and (not td_address.startswith("ssl://")) ): td_address = "tcp://" + td_address if ( - (not md_address.startswith("tcp://")) and - (not md_address.startswith("ssl://")) + (not md_address.startswith("tcp://")) + and (not md_address.startswith("ssl://")) ): md_address = "tcp://" + md_address diff --git a/vnpy/gateway/ctptest/ctptest_gateway.py b/vnpy/gateway/ctptest/ctptest_gateway.py index 1d109eae..3d83dd8d 100644 --- a/vnpy/gateway/ctptest/ctptest_gateway.py +++ b/vnpy/gateway/ctptest/ctptest_gateway.py @@ -156,14 +156,14 @@ class CtptestGateway(BaseGateway): product_info = setting["产品信息"] if ( - (not td_address.startswith("tcp://")) and - (not td_address.startswith("ssl://")) + (not td_address.startswith("tcp://")) + and (not td_address.startswith("ssl://")) ): td_address = "tcp://" + td_address if ( - (not md_address.startswith("tcp://")) and - (not md_address.startswith("ssl://")) + (not md_address.startswith("tcp://")) + and (not md_address.startswith("ssl://")) ): md_address = "tcp://" + md_address diff --git a/vnpy/trader/rqdata.py b/vnpy/trader/rqdata.py index 1feed7a0..0e793952 100644 --- a/vnpy/trader/rqdata.py +++ b/vnpy/trader/rqdata.py @@ -50,7 +50,7 @@ class RqdataClient: return False rqdata_init( - self.username, + self.username, self.password, ('rqdatad-pro.ricequant.com', 16011), use_pool=True