Option trading api

Discussion in 'Options' started by viruscore1, Apr 24, 2019.

  1. 2rosy

    2rosy

    its the same thing. just add strike, expiration, put or call to the order
    ... i could put this quote in book format if you'll buy it
     
    #11     Apr 24, 2019
  2. Reply with working code snippet. Lots of talk out there ...
     
    #12     Apr 25, 2019
  3. 2rosy

    2rosy

    good luck
    Code:
        def makeOptOrder(action, oID, tif, orderType,price,qty):
            newOptOrder = Order()
            newOptOrder.m_orderId = oID
            newOptOrder.m_clientId = 0
            newOptOrder.m_permid = 0
            newOptOrder.m_action = action
            newOptOrder.m_lmtPrice = price
            newOptOrder.m_auxPrice = 0
            newOptOrder.m_tif = tif
            newOptOrder.m_transmit = True
            newOptOrder.m_orderType = orderType
            #newOptOrder.m_goodTillDate= '20120702 08:27:22'
            #newOptOrder.m_ocaType = 0
            #newOptOrder.m_ocaGroup = "nernygrp"
            newOptOrder.m_totalQuantity = qty
            #newOptOrder.m_hidden= True
            return newOptOrder
    
    
     
    #13     Apr 25, 2019
    viruscore1 likes this.
  4. Find it here?
    https://www.programcreek.com/java-a...ptocoinpartners/schema/PortfolioManager.java#
     
    #14     Apr 26, 2019