当前位置: 首页>>代码示例>>Python>>正文


Python Contract.m_nextOptionType方法代码示例

本文整理汇总了Python中ib.ext.Contract.Contract.m_nextOptionType方法的典型用法代码示例。如果您正苦于以下问题:Python Contract.m_nextOptionType方法的具体用法?Python Contract.m_nextOptionType怎么用?Python Contract.m_nextOptionType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ib.ext.Contract.Contract的用法示例。


在下文中一共展示了Contract.m_nextOptionType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: processMsg

# 需要导入模块: from ib.ext.Contract import Contract [as 别名]
# 或者: from ib.ext.Contract.Contract import m_nextOptionType [as 别名]

#.........这里部分代码省略.........
             contract.m_timeZoneId = self.readStr()
             contract.m_tradingHours = self.readStr()
             contract.m_liquidHours = self.readStr()
         self.eWrapper().contractDetails(reqId, contract)
     elif msgId == self.BOND_CONTRACT_DATA:
         version = self.readInt()
         reqId = -1
         if version >= 3:
             reqId = self.readInt()
         contract = ContractDetails()
         contract.m_summary.m_symbol = self.readStr()
         contract.m_summary.m_secType = self.readStr()
         contract.m_cusip = self.readStr()
         contract.m_coupon = self.readDouble()
         contract.m_maturity = self.readStr()
         contract.m_issueDate = self.readStr()
         contract.m_ratings = self.readStr()
         contract.m_bondType = self.readStr()
         contract.m_couponType = self.readStr()
         contract.m_convertible = self.readBoolFromInt()
         contract.m_callable = self.readBoolFromInt()
         contract.m_putable = self.readBoolFromInt()
         contract.m_descAppend = self.readStr()
         contract.m_summary.m_exchange = self.readStr()
         contract.m_summary.m_currency = self.readStr()
         contract.m_marketName = self.readStr()
         contract.m_tradingClass = self.readStr()
         contract.m_summary.m_conId = self.readInt()
         contract.m_minTick = self.readDouble()
         contract.m_orderTypes = self.readStr()
         contract.m_validExchanges = self.readStr()
         if version >= 2:
             contract.m_nextOptionDate = self.readStr()
             contract.m_nextOptionType = self.readStr()
             contract.m_nextOptionPartial = self.readBoolFromInt()
             contract.m_notes = self.readStr()
         if version >= 4:
             contract.m_longName = self.readStr()
         self.eWrapper().bondContractDetails(reqId, contract)
     elif msgId == self.EXECUTION_DATA:
         version = self.readInt()
         reqId = -1
         if version >= 7:
             reqId = self.readInt()
         orderId = self.readInt()
         contract = Contract()
         if version >= 5:
             contract.m_conId = self.readInt()
         contract.m_symbol = self.readStr()
         contract.m_secType = self.readStr()
         contract.m_expiry = self.readStr()
         contract.m_strike = self.readDouble()
         contract.m_right = self.readStr()
         contract.m_exchange = self.readStr()
         contract.m_currency = self.readStr()
         contract.m_localSymbol = self.readStr()
         exec_ = Execution()
         exec_.m_orderId = orderId
         exec_.m_execId = self.readStr()
         exec_.m_time = self.readStr()
         exec_.m_acctNumber = self.readStr()
         exec_.m_exchange = self.readStr()
         exec_.m_side = self.readStr()
         exec_.m_shares = self.readInt()
         exec_.m_price = self.readDouble()
         if version >= 2:
开发者ID:Jicheng-Yan,项目名称:ib-py,代码行数:70,代码来源:EReader.py


注:本文中的ib.ext.Contract.Contract.m_nextOptionType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。