本文整理汇总了Python中ib.ext.Contract.Contract.m_contractMonth方法的典型用法代码示例。如果您正苦于以下问题:Python Contract.m_contractMonth方法的具体用法?Python Contract.m_contractMonth怎么用?Python Contract.m_contractMonth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ib.ext.Contract.Contract
的用法示例。
在下文中一共展示了Contract.m_contractMonth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: processMsg
# 需要导入模块: from ib.ext.Contract import Contract [as 别名]
# 或者: from ib.ext.Contract.Contract import m_contractMonth [as 别名]
#.........这里部分代码省略.........
legsStr = self.readStr()
self.eWrapper().scannerData(tickerId, rank, contract, distance, benchmark, projection, legsStr)
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()