本文整理汇总了Python中ib.ext.Order.Order.m_smartComboRoutingParams方法的典型用法代码示例。如果您正苦于以下问题:Python Order.m_smartComboRoutingParams方法的具体用法?Python Order.m_smartComboRoutingParams怎么用?Python Order.m_smartComboRoutingParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ib.ext.Order.Order
的用法示例。
在下文中一共展示了Order.m_smartComboRoutingParams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: processMsg
# 需要导入模块: from ib.ext.Order import Order [as 别名]
# 或者: from ib.ext.Order.Order import m_smartComboRoutingParams [as 别名]
#.........这里部分代码省略.........
if version >= 14:
order.m_basisPoints = self.readDoubleMax()
order.m_basisPointsType = self.readIntMax()
contract.m_comboLegsDescrip = self.readStr()
if version >= 29:
comboLegsCount = self.readInt()
if comboLegsCount > 0:
contract.m_comboLegs = []
i = 0
while i < comboLegsCount:
conId = self.readInt()
ratio = self.readInt()
action = self.readStr()
exchange = self.readStr()
openClose = self.readInt()
shortSaleSlot = self.readInt()
designatedLocation = self.readStr()
exemptCode = self.readInt()
comboLeg = ComboLeg(conId, ratio, action, exchange, openClose, shortSaleSlot, designatedLocation, exemptCode)
contract.m_comboLegs.append(comboLeg)
i += 1
orderComboLegsCount = self.readInt()
if orderComboLegsCount > 0:
order.m_orderComboLegs = []
i = 0
while i < orderComboLegsCount:
price = self.readDoubleMax()
orderComboLeg = OrderComboLeg(price)
order.m_orderComboLegs.append(orderComboLeg)
i += 1
if version >= 26:
smartComboRoutingParamsCount = self.readInt()
if smartComboRoutingParamsCount > 0:
order.m_smartComboRoutingParams = []
i = 0
while i < smartComboRoutingParamsCount:
tagValue = TagValue()
tagValue.m_tag = self.readStr()
tagValue.m_value = self.readStr()
order.m_smartComboRoutingParams.append(tagValue)
i += 1
if version >= 15:
if version >= 20:
order.m_scaleInitLevelSize = self.readIntMax()
order.m_scaleSubsLevelSize = self.readIntMax()
else:
# int notSuppScaleNumComponents =
self.readIntMax()
order.m_scaleInitLevelSize = self.readIntMax()
order.m_scalePriceIncrement = self.readDoubleMax()
if version >= 28 and order.m_scalePriceIncrement > 0.0 and order.m_scalePriceIncrement != Double.MAX_VALUE:
order.m_scalePriceAdjustValue = self.readDoubleMax()
order.m_scalePriceAdjustInterval = self.readIntMax()
order.m_scaleProfitOffset = self.readDoubleMax()
order.m_scaleAutoReset = self.readBoolFromInt()
order.m_scaleInitPosition = self.readIntMax()
order.m_scaleInitFillQty = self.readIntMax()
order.m_scaleRandomPercent = self.readBoolFromInt()
if version >= 24:
order.m_hedgeType = self.readStr()
if not Util.StringIsEmpty(order.m_hedgeType):
order.m_hedgeParam = self.readStr()
if version >= 25:
order.m_optOutSmartRouting = self.readBoolFromInt()
if version >= 19:
order.m_clearingAccount = self.readStr()