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


Python Contract.m_category方法代码示例

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


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

示例1: processMsg

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

#.........这里部分代码省略.........
             ctr += 1
         self.eWrapper().scannerDataEnd(tickerId)
     elif msgId == self.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_summary.m_expiry = self.readStr()
         contract.m_summary.m_strike = self.readDouble()
         contract.m_summary.m_right = self.readStr()
         contract.m_summary.m_exchange = self.readStr()
         contract.m_summary.m_currency = self.readStr()
         contract.m_summary.m_localSymbol = 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_summary.m_multiplier = self.readStr()
         contract.m_orderTypes = self.readStr()
         contract.m_validExchanges = self.readStr()
         if version >= 2:
             contract.m_priceMagnifier = self.readInt()
         if version >= 4:
             contract.m_underConId = self.readInt()
         if version >= 5:
             contract.m_longName = self.readStr()
             contract.m_summary.m_primaryExch = self.readStr()
         if version >= 6:
             contract.m_contractMonth = self.readStr()
             contract.m_industry = self.readStr()
             contract.m_category = self.readStr()
             contract.m_subcategory = self.readStr()
             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()
开发者ID:Jicheng-Yan,项目名称:ib-py,代码行数:70,代码来源:EReader.py


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