本文整理汇总了Python中ib.ext.Order.Order.m_ocaGroup方法的典型用法代码示例。如果您正苦于以下问题:Python Order.m_ocaGroup方法的具体用法?Python Order.m_ocaGroup怎么用?Python Order.m_ocaGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ib.ext.Order.Order
的用法示例。
在下文中一共展示了Order.m_ocaGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: processMsg
# 需要导入模块: from ib.ext.Order import Order [as 别名]
# 或者: from ib.ext.Order.Order import m_ocaGroup [as 别名]
#.........这里部分代码省略.........
self.eWrapper().updateAccountTime(timeStamp)
elif msgId == self.ERR_MSG:
version = self.readInt()
if version < 2:
msg = self.readStr()
self.m_parent.error(msg)
else:
id = self.readInt()
errorCode = self.readInt()
errorMsg = self.readStr()
self.m_parent.error(id, errorCode, errorMsg)
elif msgId == self.OPEN_ORDER:
version = self.readInt()
order = Order()
order.m_orderId = self.readInt()
contract = Contract()
if version >= 17:
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()
if version >= 2:
contract.m_localSymbol = self.readStr()
order.m_action = self.readStr()
order.m_totalQuantity = self.readInt()
order.m_orderType = self.readStr()
order.m_lmtPrice = self.readDouble()
order.m_auxPrice = self.readDouble()
order.m_tif = self.readStr()
order.m_ocaGroup = self.readStr()
order.m_account = self.readStr()
order.m_openClose = self.readStr()
order.m_origin = self.readInt()
order.m_orderRef = self.readStr()
if version >= 3:
order.m_clientId = self.readInt()
if version >= 4:
order.m_permId = self.readInt()
if version < 18:
self.readBoolFromInt()
else:
order.m_outsideRth = self.readBoolFromInt()
order.m_hidden = (self.readInt() == 1)
order.m_discretionaryAmt = self.readDouble()
if version >= 5:
order.m_goodAfterTime = self.readStr()
if version >= 6:
self.readStr()
if version >= 7:
order.m_faGroup = self.readStr()
order.m_faMethod = self.readStr()
order.m_faPercentage = self.readStr()
order.m_faProfile = self.readStr()
if version >= 8:
order.m_goodTillDate = self.readStr()
if version >= 9:
order.m_rule80A = self.readStr()
order.m_percentOffset = self.readDouble()
order.m_settlingFirm = self.readStr()
order.m_shortSaleSlot = self.readInt()
order.m_designatedLocation = self.readStr()
if (self.m_parent.serverVersion() == 51):