添加期权到期日字段

This commit is contained in:
vn.py 2017-08-22 13:40:18 +08:00
parent c7e22af499
commit 8174ebb72e
2 changed files with 2 additions and 0 deletions

View File

@ -389,6 +389,7 @@ class CshshlpTdApi(CsHsHlp):
contract.underlyingSymbol = d['stock_code'] contract.underlyingSymbol = d['stock_code']
contract.productClass = PRODUCT_OPTION contract.productClass = PRODUCT_OPTION
contract.optionType = optionTypeMapReverse[d['option_type']] contract.optionType = optionTypeMapReverse[d['option_type']]
contract.expiryDate = d['end_date']
self.gateway.onContract(contract) self.gateway.onContract(contract)

View File

@ -260,6 +260,7 @@ class VtContractData(VtBaseData):
self.strikePrice = EMPTY_FLOAT # 期权行权价 self.strikePrice = EMPTY_FLOAT # 期权行权价
self.underlyingSymbol = EMPTY_STRING # 标的物合约代码 self.underlyingSymbol = EMPTY_STRING # 标的物合约代码
self.optionType = EMPTY_UNICODE # 期权类型 self.optionType = EMPTY_UNICODE # 期权类型
self.expiryDate = EMPTY_STRING # 到期日
######################################################################## ########################################################################