def __init__(self, **kwargs):
        """
        Create a new FixedPriceOrderTransaction instance
        """
        super(FixedPriceOrderTransaction, self).__init__()
 
        #
        # The Transaction's Identifier.
        #
        self.id = kwargs.get("id")
 
        #
        # The date/time when the Transaction was created.
        #
        self.time = kwargs.get("time")
 
        #
        # The ID of the user that initiated the creation of the Transaction.
        #
        self.userID = kwargs.get("userID")
 
        #
        # The ID of the Account the Transaction was created for.
        #
        self.accountID = kwargs.get("accountID")
 
        #
        # The ID of the "batch" that the Transaction belongs to. Transactions
        # in the same batch are applied to the Account simultaneously.
        #
        self.batchID = kwargs.get("batchID")
 
        #
        # The Request ID of the request which generated the transaction.
        #
        self.requestID = kwargs.get("requestID")
 
        #
        # The Type of the Transaction. Always set to "FIXED_PRICE_ORDER" in a
        # FixedPriceOrderTransaction.
        #
        self.type = kwargs.get("type", "FIXED_PRICE_ORDER")
 
        #
        # The Fixed Price Order's Instrument.
        #
        self.instrument = kwargs.get("instrument")
 
        #
        # The quantity requested to be filled by the Fixed Price Order. A
        # posititive number of units results in a long Order, and a negative
        # number of units results in a short Order.
        #
        self.units = kwargs.get("units")
 
        #
        # The price specified for the Fixed Price Order. This price is the
        # exact price that the Fixed Price Order will be filled at.
        #
        self.price = kwargs.get("price")
 
        #
        # Specification of how Positions in the Account are modified when the
        # Order is filled.
        #
        self.positionFill = kwargs.get("positionFill", "DEFAULT")
 
        #
        # The state that the trade resulting from the Fixed Price Order should
        # be set to.
        #
        self.tradeState = kwargs.get("tradeState")
 
        #
        # The reason that the Fixed Price Order was created
        #
        self.reason = kwargs.get("reason")
 
        #
        # The client extensions for the Fixed Price Order.
        #
        self.clientExtensions = kwargs.get("clientExtensions")
 
        #
        # The specification of the Take Profit Order that should be created for
        # a Trade opened when the Order is filled (if such a Trade is created).
        #
        self.takeProfitOnFill = kwargs.get("takeProfitOnFill")
 
        #
        # The specification of the Stop Loss Order that should be created for a
        # Trade opened when the Order is filled (if such a Trade is created).
        #
        self.stopLossOnFill = kwargs.get("stopLossOnFill")
 
        #
        # The specification of the Trailing Stop Loss Order that should be
        # created for a Trade that is opened when the Order is filled (if such
        # a Trade is created).
        #
        self.trailingStopLossOnFill = kwargs.get("trailingStopLossOnFill")
 
        #
        # Client Extensions to add to the Trade created when the Order is
        # filled (if such a Trade is created).  Do not set, modify, delete
        # tradeClientExtensions if your account is associated with MT4.
        #
        self.tradeClientExtensions = kwargs.get("tradeClientExtensions")
def __init__ ( self , ** kwargs ) : super ( FixedPriceOrderTransaction , self ) . __init__ ( ) self . id = kwargs . get ( "id" ) self . time = kwargs . get ( "time" ) self . userID = kwargs . get ( "userID" ) self . accountID = kwargs . get ( "accountID" ) self . batchID = kwargs . get ( "batchID" ) self . requestID = kwargs . get ( "requestID" ) self . type = kwargs . get ( "type" , "FIXED_PRICE_ORDER" ) self . instrument = kwargs . get ( "instrument" ) self . units = kwargs . get ( "units" ) self . price = kwargs . get ( "price" ) self . positionFill = kwargs . get ( "positionFill" , "DEFAULT" ) self . tradeState = kwargs . get ( "tradeState" ) self . reason = kwargs . get ( "reason" ) self . clientExtensions = kwargs . get ( "clientExtensions" ) self . takeProfitOnFill = kwargs . get ( "takeProfitOnFill" ) self . stopLossOnFill = kwargs . get ( "stopLossOnFill" ) self . trailingStopLossOnFill = kwargs . get ( "trailingStopLossOnFill" ) self . tradeClientExtensions = kwargs . get ( "tradeClientExtensions" )
Create a new FixedPriceOrderTransaction instance