From 8174ebb72ea6cf51a5c7cd4b9d5c2feceb9f6d67 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 22 Aug 2017 13:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=9F=E6=9D=83=E5=88=B0?= =?UTF-8?q?=E6=9C=9F=E6=97=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py | 1 + vnpy/trader/vtObject.py | 1 + 2 files changed, 2 insertions(+) diff --git a/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py b/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py index 8e8689cb..767fd7fb 100644 --- a/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py +++ b/vnpy/trader/gateway/cshshlpGateway/cshshlpGateway.py @@ -389,6 +389,7 @@ class CshshlpTdApi(CsHsHlp): contract.underlyingSymbol = d['stock_code'] contract.productClass = PRODUCT_OPTION contract.optionType = optionTypeMapReverse[d['option_type']] + contract.expiryDate = d['end_date'] self.gateway.onContract(contract) diff --git a/vnpy/trader/vtObject.py b/vnpy/trader/vtObject.py index 4d9612a4..a0a0e421 100644 --- a/vnpy/trader/vtObject.py +++ b/vnpy/trader/vtObject.py @@ -260,6 +260,7 @@ class VtContractData(VtBaseData): self.strikePrice = EMPTY_FLOAT # 期权行权价 self.underlyingSymbol = EMPTY_STRING # 标的物合约代码 self.optionType = EMPTY_UNICODE # 期权类型 + self.expiryDate = EMPTY_STRING # 到期日 ########################################################################