本文整理汇总了Python中ib.ext.Contract.Contract.m_marketName方法的典型用法代码示例。如果您正苦于以下问题:Python Contract.m_marketName方法的具体用法?Python Contract.m_marketName怎么用?Python Contract.m_marketName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ib.ext.Contract.Contract
的用法示例。
在下文中一共展示了Contract.m_marketName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: processMsg
# 需要导入模块: from ib.ext.Contract import Contract [as 别名]
# 或者: from ib.ext.Contract.Contract import m_marketName [as 别名]
#.........这里部分代码省略.........
orderState.m_status = self.readStr()
orderState.m_initMargin = self.readStr()
orderState.m_maintMargin = self.readStr()
orderState.m_equityWithLoan = self.readStr()
orderState.m_commission = self.readDoubleMax()
orderState.m_minCommission = self.readDoubleMax()
orderState.m_maxCommission = self.readDoubleMax()
orderState.m_commissionCurrency = self.readStr()
orderState.m_warningText = self.readStr()
self.eWrapper().openOrder(order.m_orderId, contract, order, orderState)
elif msgId == self.NEXT_VALID_ID:
version = self.readInt()
orderId = self.readInt()
self.eWrapper().nextValidId(orderId)
elif msgId == self.SCANNER_DATA:
contract = ContractDetails()
version = self.readInt()
tickerId = self.readInt()
numberOfElements = self.readInt()
## for-while
ctr = 0
while ctr < numberOfElements:
rank = self.readInt()
if version >= 3:
contract.m_summary.m_conId = self.readInt()
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()
distance = self.readStr()
benchmark = self.readStr()
projection = self.readStr()
legsStr = None
if version >= 2:
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: