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


Python Order.m_permid方法代码示例

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


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

示例1: makeOptOrder

# 需要导入模块: from ib.ext.Order import Order [as 别名]
# 或者: from ib.ext.Order.Order import m_permid [as 别名]
def makeOptOrder(action, orderID, tif, orderType):
    newOptOrder = Order()
    newOptOrder.m_orderId = orderID
    newOptOrder.m_clientId = 0
    newOptOrder.m_permid = 0
    newOptOrder.m_action = action
    newOptOrder.m_lmtPrice = 0
    newOptOrder.m_auxPrice = 0
    newOptOrder.m_tif = tif
    newOptOrder.m_transmit = False
    newOptOrder.m_orderType = orderType
    newOptOrder.m_totalQuantity = 1
    return newOptOrder
开发者ID:Jicheng-Yan,项目名称:ib-py,代码行数:15,代码来源:option_order_data.py

示例2: makeFutOrder

# 需要导入模块: from ib.ext.Order import Order [as 别名]
# 或者: from ib.ext.Order.Order import m_permid [as 别名]
def makeFutOrder(type, action, orderId=-99, price=None):
    order = Order()
    order.m_orderId = orderId
    order.m_clientId = 0
    order.m_permid = 0
    order.m_orderType = type
    order.m_action = action
    order.m_minQty = 1
    order.m_totalQuantity = 1
    # order.m_transmit = False
    if type == 'LMT':
        order.m_lmtPrice = price
    if action == 'SELL':
        pass

    return order
开发者ID:lightme16,项目名称:ibpy_work,代码行数:18,代码来源:working_prototype.py

示例3: addmktorder

# 需要导入模块: from ib.ext.Order import Order [as 别名]
# 或者: from ib.ext.Order.Order import m_permid [as 别名]
def addmktorder(cid, action, qty):
    id = len(orders)
    o = Order()
    o.m_orderId = id
    o.m_clientId = 0
    o.m_permid = 0
    o.m_action = action
    o.m_lmtPrice = 0
    o.m_auxPrice = 0
    o.m_tif = 'DAY'
    o.m_orderType = 'MKT'
    o.m_totalQuantity = qty
    o.m_transmit = True
    orders.append([o, cid, qty, id])        
    con.placeOrder(id, contracts[cid], o)
    position(cid)
    pending(cid)
开发者ID:dm04806,项目名称:systemn,代码行数:19,代码来源:test.py

示例4: makeOrder

# 需要导入模块: from ib.ext.Order import Order [as 别名]
# 或者: from ib.ext.Order.Order import m_permid [as 别名]
    def makeOrder(self, action, orderId, tif, orderType, price, transmit, parentId):
        newOrder = Order()
        newOrder.m_orderId = orderId
        newOrder.m_transmit = transmit
        newOrder.m_lmtPrice = price
        newOrder.m_tif = tif
        newOrder.m_action = action
        newOrder.m_orderType = orderType
        if parentId is not None:
            newOrder.m_parentId = parentId

        newOrder.m_hidden = False
        newOrder.m_outsideRth = True
        newOrder.m_clientId = 999
        newOrder.m_permid = 0
        if orderType == 'LMT':
            newOrder.m_auxPrice = 0
        elif orderType == 'STP' or orderType == 'MIT':
            newOrder.m_auxPrice = price
        newOrder.m_totalQuantity = 1
        
        return newOrder
开发者ID:chicagohawk,项目名称:TwitterAutoTrade,代码行数:24,代码来源:iblib.py


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