def __init__(self, **kwargs):
        """
        Create a new TradeOpen instance
        """
        super(TradeOpen, self).__init__()
 
        #
        # The ID of the Trade that was opened
        #
        self.tradeID = kwargs.get("tradeID")
 
        #
        # The number of units opened by the Trade
        #
        self.units = kwargs.get("units")
 
        #
        # The average price that the units were opened at.
        #
        self.price = kwargs.get("price")
 
        #
        # This is the fee charged for opening the trade if it has a guaranteed
        # Stop Loss Order attached to it.
        #
        self.guaranteedExecutionFee = kwargs.get("guaranteedExecutionFee")
 
        #
        # The client extensions for the newly opened Trade
        #
        self.clientExtensions = kwargs.get("clientExtensions")
 
        #
        # The half spread cost for the trade open. This can be a positive or
        # negative value and is represented in the home currency of the
        # Account.
        #
        self.halfSpreadCost = kwargs.get("halfSpreadCost")
 
        #
        # The margin required at the time the Trade was created. Note, this is
        # the 'pure' margin required, it is not the 'effective' margin used
        # that factors in the trade risk if a GSLO is attached to the trade.
        #
        self.initialMarginRequired = kwargs.get("initialMarginRequired")
def __init__ ( self , ** kwargs ) : super ( TradeOpen , self ) . __init__ ( ) self . tradeID = kwargs . get ( "tradeID" ) self . units = kwargs . get ( "units" ) self . price = kwargs . get ( "price" ) self . guaranteedExecutionFee = kwargs . get ( "guaranteedExecutionFee" ) self . clientExtensions = kwargs . get ( "clientExtensions" ) self . halfSpreadCost = kwargs . get ( "halfSpreadCost" ) self . initialMarginRequired = kwargs . get ( "initialMarginRequired" )
Create a new TradeOpen instance