补充rsEngine的stop方法,修复ctpGateway关于期权类型的映射问题

This commit is contained in:
vn.py 2017-09-05 20:54:29 +08:00
parent 7b2888200f
commit 704ef3a78d
2 changed files with 7 additions and 6 deletions

View File

@ -88,6 +88,6 @@ class RsEngine(object):
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def stop(self): def stop(self):
"""停止""" """停止"""
pass self.server.stop()

View File

@ -804,6 +804,7 @@ class CtpTdApi(TdApi):
contract.productClass = productClassMapReverse.get(data['ProductClass'], PRODUCT_UNKNOWN) contract.productClass = productClassMapReverse.get(data['ProductClass'], PRODUCT_UNKNOWN)
# 期权类型 # 期权类型
if contract.productClass is PRODUCT_OPTION:
if data['OptionsType'] == '1': if data['OptionsType'] == '1':
contract.optionType = OPTION_CALL contract.optionType = OPTION_CALL
elif data['OptionsType'] == '2': elif data['OptionsType'] == '2':