From 240c3fbdedad3ba416dacfd88ca558c474bbec3a Mon Sep 17 00:00:00 2001 From: nanoric Date: Wed, 5 Sep 2018 05:01:22 -0400 Subject: [PATCH] =?UTF-8?q?[Fix]=20=E6=9F=90=E4=BA=9B=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=BE=80CTP=E6=8E=A5=E5=8F=A3=E4=B8=8B=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E4=BA=A7=E7=94=9F=E5=8F=82=E6=95=B0=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nanoric --- vnpy/trader/gateway/ctpGateway/ctpGateway.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/gateway/ctpGateway/ctpGateway.py b/vnpy/trader/gateway/ctpGateway/ctpGateway.py index 419d4edd..f8364a1e 100644 --- a/vnpy/trader/gateway/ctpGateway/ctpGateway.py +++ b/vnpy/trader/gateway/ctpGateway/ctpGateway.py @@ -1432,7 +1432,7 @@ class CtpTdApi(TdApi): req['InstrumentID'] = orderReq.symbol req['LimitPrice'] = orderReq.price - req['VolumeTotalOriginal'] = orderReq.volume + req['VolumeTotalOriginal'] = int(orderReq.volume) # 下面如果由于传入的类型本接口不支持,则会返回空字符串 req['OrderPriceType'] = priceTypeMap.get(orderReq.priceType, '') @@ -1460,7 +1460,7 @@ class CtpTdApi(TdApi): if orderReq.priceType == PRICETYPE_FOK: req['OrderPriceType'] = defineDict["THOST_FTDC_OPT_LimitPrice"] req['TimeCondition'] = defineDict['THOST_FTDC_TC_IOC'] - req['VolumeCondition'] = defineDict['THOST_FTDC_VC_CV'] + req['VolumeCondition'] = int(defineDict['THOST_FTDC_VC_CV']) self.reqOrderInsert(req, self.reqID)