/// <summary> /// Initializes a new instance of the <see cref="ClosePositionBody" /> class. /// </summary> /// <param name="LongUnits">Indication of how much of the long Position to closeout. Either the string \"ALL\", the string \"NONE\", or a DecimalNumber representing how many units of the long position to close using a PositionCloseout MarketOrder. The units specified must always be positive..</param> /// <param name="LongClientExtensions">LongClientExtensions.</param> /// <param name="ShortUnits">Indication of how much of the short Position to closeout. Either the string \"ALL\", the string \"NONE\", or a DecimalNumber representing how many units of the short position to close using a PositionCloseout MarketOrder. The units specified must always be positive..</param> /// <param name="ShortClientExtensions">ShortClientExtensions.</param> public ClosePositionBody(string LongUnits = default(string), ClientExtensions LongClientExtensions = default(ClientExtensions), string ShortUnits = default(string), ClientExtensions ShortClientExtensions = default(ClientExtensions)) { this.LongUnits = LongUnits; this.LongClientExtensions = LongClientExtensions; this.ShortUnits = ShortUnits; this.ShortClientExtensions = ShortClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="LimitOrderTransaction" /> class. /// </summary> /// <param name="Id">The Transaction's Identifier..</param> /// <param name="Time">The date/time when the Transaction was created..</param> /// <param name="UserID">The ID of the user that initiated the creation of the Transaction..</param> /// <param name="AccountID">The ID of the Account the Transaction was created for..</param> /// <param name="BatchID">The ID of the \"batch\" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously..</param> /// <param name="RequestID">The Request ID of the request which generated the transaction..</param> /// <param name="Type">The Type of the Transaction. Always set to \"LIMIT_ORDER\" in a LimitOrderTransaction..</param> /// <param name="Instrument">The Limit Order's Instrument..</param> /// <param name="Units">The quantity requested to be filled by the Limit Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order..</param> /// <param name="Price">The price threshold specified for the Limit Order. The Limit Order will only be filled by a market price that is equal to or better than this price..</param> /// <param name="TimeInForce">The time-in-force requested for the Limit Order..</param> /// <param name="GtdTime">The date/time when the Limit Order will be cancelled if its timeInForce is \"GTD\"..</param> /// <param name="PositionFill">Specification of how Positions in the Account are modified when the Order is filled..</param> /// <param name="TriggerCondition">Specification of what component of a price should be used for comparison when determining if the Order should be filled..</param> /// <param name="Reason">The reason that the Limit Order was initiated.</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="TakeProfitOnFill">TakeProfitOnFill.</param> /// <param name="StopLossOnFill">StopLossOnFill.</param> /// <param name="TrailingStopLossOnFill">TrailingStopLossOnFill.</param> /// <param name="TradeClientExtensions">TradeClientExtensions.</param> /// <param name="ReplacesOrderID">The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order)..</param> /// <param name="CancellingTransactionID">The ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order)..</param> public LimitOrderTransaction(string Id = default(string), string Time = default(string), int?UserID = default(int?), string AccountID = default(string), string BatchID = default(string), string RequestID = default(string), TypeEnum?Type = default(TypeEnum?), string Instrument = default(string), string Units = default(string), string Price = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), PositionFillEnum?PositionFill = default(PositionFillEnum?), TriggerConditionEnum?TriggerCondition = default(TriggerConditionEnum?), ReasonEnum?Reason = default(ReasonEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), TakeProfitDetails TakeProfitOnFill = default(TakeProfitDetails), StopLossDetails StopLossOnFill = default(StopLossDetails), TrailingStopLossDetails TrailingStopLossOnFill = default(TrailingStopLossDetails), ClientExtensions TradeClientExtensions = default(ClientExtensions), string ReplacesOrderID = default(string), string CancellingTransactionID = default(string)) { this.Id = Id; this.Time = Time; this.UserID = UserID; this.AccountID = AccountID; this.BatchID = BatchID; this.RequestID = RequestID; this.Type = Type; this.Instrument = Instrument; this.Units = Units; this.Price = Price; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.PositionFill = PositionFill; this.TriggerCondition = TriggerCondition; this.Reason = Reason; this.ClientExtensions = ClientExtensions; this.TakeProfitOnFill = TakeProfitOnFill; this.StopLossOnFill = StopLossOnFill; this.TrailingStopLossOnFill = TrailingStopLossOnFill; this.TradeClientExtensions = TradeClientExtensions; this.ReplacesOrderID = ReplacesOrderID; this.CancellingTransactionID = CancellingTransactionID; }
/// <summary> /// Initializes a new instance of the <see cref="TrailingStopLossOrderRequest" /> class. /// </summary> /// <param name="Type">The type of the Order to Create. Must be set to \"TRAILING_STOP_LOSS\" when creating a Trailng Stop Loss Order..</param> /// <param name="TradeID">The ID of the Trade to close when the price threshold is breached..</param> /// <param name="ClientTradeID">The client ID of the Trade to be closed when the price threshold is breached..</param> /// <param name="Distance">The price distance specified for the TrailingStopLoss Order..</param> /// <param name="TimeInForce">The time-in-force requested for the TrailingStopLoss Order. Restricted to \"GTC\", \"GFD\" and \"GTD\" for TrailingStopLoss Orders..</param> /// <param name="GtdTime">The date/time when the StopLoss Order will be cancelled if its timeInForce is \"GTD\"..</param> /// <param name="TriggerCondition">Specification of what component of a price should be used for comparison when determining if the Order should be filled..</param> /// <param name="ClientExtensions">ClientExtensions.</param> public TrailingStopLossOrderRequest(TypeEnum?Type = default(TypeEnum?), string TradeID = default(string), string ClientTradeID = default(string), string Distance = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), TriggerConditionEnum?TriggerCondition = default(TriggerConditionEnum?), ClientExtensions ClientExtensions = default(ClientExtensions)) { this.Type = Type; this.TradeID = TradeID; this.ClientTradeID = ClientTradeID; this.Distance = Distance; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.TriggerCondition = TriggerCondition; this.ClientExtensions = ClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="StopLossOrder" /> class. /// </summary> /// <param name="Id">The Order's identifier, unique within the Order's Account..</param> /// <param name="CreateTime">The time when the Order was created..</param> /// <param name="State">The current state of the Order..</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="Type">The type of the Order. Always set to \"STOP_LOSS\" for Stop Loss Orders..</param> /// <param name="TradeID">The ID of the Trade to close when the price threshold is breached..</param> /// <param name="ClientTradeID">The client ID of the Trade to be closed when the price threshold is breached..</param> /// <param name="Price">The price threshold specified for the StopLoss Order. The associated Trade will be closed by a market price that is equal to or worse than this threshold..</param> /// <param name="TimeInForce">The time-in-force requested for the StopLoss Order. Restricted to \"GTC\", \"GFD\" and \"GTD\" for StopLoss Orders..</param> /// <param name="GtdTime">The date/time when the StopLoss Order will be cancelled if its timeInForce is \"GTD\"..</param> /// <param name="TriggerCondition">Specification of what component of a price should be used for comparison when determining if the Order should be filled..</param> /// <param name="FillingTransactionID">ID of the Transaction that filled this Order (only provided when the Order's state is FILLED).</param> /// <param name="FilledTime">Date/time when the Order was filled (only provided when the Order's state is FILLED).</param> /// <param name="TradeOpenedID">Trade ID of Trade opened when the Order was filled (only provided when the Order's state is FILLED and a Trade was opened as a result of the fill).</param> /// <param name="TradeReducedID">Trade ID of Trade reduced when the Order was filled (only provided when the Order's state is FILLED and a Trade was reduced as a result of the fill).</param> /// <param name="TradeClosedIDs">Trade IDs of Trades closed when the Order was filled (only provided when the Order's state is FILLED and one or more Trades were closed as a result of the fill).</param> /// <param name="CancellingTransactionID">ID of the Transaction that cancelled the Order (only provided when the Order's state is CANCELLED).</param> /// <param name="CancelledTime">Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED).</param> /// <param name="ReplacesOrderID">The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace)..</param> /// <param name="ReplacedByOrderID">The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace)..</param> public StopLossOrder(string Id = default(string), string CreateTime = default(string), StateEnum?State = default(StateEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), TypeEnum?Type = default(TypeEnum?), string TradeID = default(string), string ClientTradeID = default(string), string Price = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), TriggerConditionEnum?TriggerCondition = default(TriggerConditionEnum?), string FillingTransactionID = default(string), string FilledTime = default(string), string TradeOpenedID = default(string), string TradeReducedID = default(string), List <string> TradeClosedIDs = default(List <string>), string CancellingTransactionID = default(string), string CancelledTime = default(string), string ReplacesOrderID = default(string), string ReplacedByOrderID = default(string)) { this.Id = Id; this.CreateTime = CreateTime; this.State = State; this.ClientExtensions = ClientExtensions; this.Type = Type; this.TradeID = TradeID; this.ClientTradeID = ClientTradeID; this.Price = Price; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.TriggerCondition = TriggerCondition; this.FillingTransactionID = FillingTransactionID; this.FilledTime = FilledTime; this.TradeOpenedID = TradeOpenedID; this.TradeReducedID = TradeReducedID; this.TradeClosedIDs = TradeClosedIDs; this.CancellingTransactionID = CancellingTransactionID; this.CancelledTime = CancelledTime; this.ReplacesOrderID = ReplacesOrderID; this.ReplacedByOrderID = ReplacedByOrderID; }
/// <summary> /// Initializes a new instance of the <see cref="TakeProfitOrderTransaction" /> class. /// </summary> /// <param name="Id">The Transaction's Identifier..</param> /// <param name="Time">The date/time when the Transaction was created..</param> /// <param name="UserID">The ID of the user that initiated the creation of the Transaction..</param> /// <param name="AccountID">The ID of the Account the Transaction was created for..</param> /// <param name="BatchID">The ID of the \"batch\" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously..</param> /// <param name="RequestID">The Request ID of the request which generated the transaction..</param> /// <param name="Type">The Type of the Transaction. Always set to \"TAKE_PROFIT_ORDER\" in a TakeProfitOrderTransaction..</param> /// <param name="TradeID">The ID of the Trade to close when the price threshold is breached..</param> /// <param name="ClientTradeID">The client ID of the Trade to be closed when the price threshold is breached..</param> /// <param name="Price">The price threshold specified for the TakeProfit Order. The associated Trade will be closed by a market price that is equal to or better than this threshold..</param> /// <param name="TimeInForce">The time-in-force requested for the TakeProfit Order. Restricted to \"GTC\", \"GFD\" and \"GTD\" for TakeProfit Orders..</param> /// <param name="GtdTime">The date/time when the TakeProfit Order will be cancelled if its timeInForce is \"GTD\"..</param> /// <param name="TriggerCondition">Specification of what component of a price should be used for comparison when determining if the Order should be filled..</param> /// <param name="Reason">The reason that the Take Profit Order was initiated.</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="OrderFillTransactionID">The ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled)..</param> /// <param name="ReplacesOrderID">The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order)..</param> /// <param name="CancellingTransactionID">The ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order)..</param> public TakeProfitOrderTransaction(string Id = default(string), string Time = default(string), int?UserID = default(int?), string AccountID = default(string), string BatchID = default(string), string RequestID = default(string), TypeEnum?Type = default(TypeEnum?), string TradeID = default(string), string ClientTradeID = default(string), string Price = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), TriggerConditionEnum?TriggerCondition = default(TriggerConditionEnum?), ReasonEnum?Reason = default(ReasonEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), string OrderFillTransactionID = default(string), string ReplacesOrderID = default(string), string CancellingTransactionID = default(string)) { this.Id = Id; this.Time = Time; this.UserID = UserID; this.AccountID = AccountID; this.BatchID = BatchID; this.RequestID = RequestID; this.Type = Type; this.TradeID = TradeID; this.ClientTradeID = ClientTradeID; this.Price = Price; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.TriggerCondition = TriggerCondition; this.Reason = Reason; this.ClientExtensions = ClientExtensions; this.OrderFillTransactionID = OrderFillTransactionID; this.ReplacesOrderID = ReplacesOrderID; this.CancellingTransactionID = CancellingTransactionID; }
/// <summary> /// Initializes a new instance of the <see cref="TradeOpen" /> class. /// </summary> /// <param name="TradeID">The ID of the Trade that was opened.</param> /// <param name="Units">The number of units opened by the Trade.</param> /// <param name="ClientExtensions">ClientExtensions.</param> public TradeOpen(string TradeID = default(string), string Units = default(string), ClientExtensions ClientExtensions = default(ClientExtensions)) { this.TradeID = TradeID; this.Units = Units; this.ClientExtensions = ClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="MarketOrderRequest" /> class. /// </summary> /// <param name="Type">The type of the Order to Create. Must be set to \"MARKET\" when creating a Market Order..</param> /// <param name="Instrument">The Market Order's Instrument..</param> /// <param name="Units">The quantity requested to be filled by the Market Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order..</param> /// <param name="TimeInForce">The time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder..</param> /// <param name="PriceBound">The worst price that the client is willing to have the Market Order filled at..</param> /// <param name="PositionFill">Specification of how Positions in the Account are modified when the Order is filled..</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="TakeProfitOnFill">TakeProfitOnFill.</param> /// <param name="StopLossOnFill">StopLossOnFill.</param> /// <param name="TrailingStopLossOnFill">TrailingStopLossOnFill.</param> /// <param name="TradeClientExtensions">TradeClientExtensions.</param> public MarketOrderRequest(TypeEnum?Type = default(TypeEnum?), string Instrument = default(string), string Units = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string PriceBound = default(string), PositionFillEnum?PositionFill = default(PositionFillEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), TakeProfitDetails TakeProfitOnFill = default(TakeProfitDetails), StopLossDetails StopLossOnFill = default(StopLossDetails), TrailingStopLossDetails TrailingStopLossOnFill = default(TrailingStopLossDetails), ClientExtensions TradeClientExtensions = default(ClientExtensions)) { this.Type = Type; this.Instrument = Instrument; this.Units = Units; this.TimeInForce = TimeInForce; this.PriceBound = PriceBound; this.PositionFill = PositionFill; this.ClientExtensions = ClientExtensions; this.TakeProfitOnFill = TakeProfitOnFill; this.StopLossOnFill = StopLossOnFill; this.TrailingStopLossOnFill = TrailingStopLossOnFill; this.TradeClientExtensions = TradeClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="SetOrderClientExtensionsBody" /> class. /// </summary> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="TradeClientExtensions">TradeClientExtensions.</param> public SetOrderClientExtensionsBody(ClientExtensions ClientExtensions = default(ClientExtensions), ClientExtensions TradeClientExtensions = default(ClientExtensions)) { this.ClientExtensions = ClientExtensions; this.TradeClientExtensions = TradeClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="LimitOrder" /> class. /// </summary> /// <param name="Id">The Order's identifier, unique within the Order's Account..</param> /// <param name="CreateTime">The time when the Order was created..</param> /// <param name="State">The current state of the Order..</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="Type">The type of the Order. Always set to \"LIMIT\" for Limit Orders..</param> /// <param name="Instrument">The Limit Order's Instrument..</param> /// <param name="Units">The quantity requested to be filled by the Limit Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order..</param> /// <param name="Price">The price threshold specified for the Limit Order. The Limit Order will only be filled by a market price that is equal to or better than this price..</param> /// <param name="TimeInForce">The time-in-force requested for the Limit Order..</param> /// <param name="GtdTime">The date/time when the Limit Order will be cancelled if its timeInForce is \"GTD\"..</param> /// <param name="PositionFill">Specification of how Positions in the Account are modified when the Order is filled..</param> /// <param name="TriggerCondition">Specification of what component of a price should be used for comparison when determining if the Order should be filled..</param> /// <param name="TakeProfitOnFill">TakeProfitOnFill.</param> /// <param name="StopLossOnFill">StopLossOnFill.</param> /// <param name="TrailingStopLossOnFill">TrailingStopLossOnFill.</param> /// <param name="TradeClientExtensions">TradeClientExtensions.</param> /// <param name="FillingTransactionID">ID of the Transaction that filled this Order (only provided when the Order's state is FILLED).</param> /// <param name="FilledTime">Date/time when the Order was filled (only provided when the Order's state is FILLED).</param> /// <param name="TradeOpenedID">Trade ID of Trade opened when the Order was filled (only provided when the Order's state is FILLED and a Trade was opened as a result of the fill).</param> /// <param name="TradeReducedID">Trade ID of Trade reduced when the Order was filled (only provided when the Order's state is FILLED and a Trade was reduced as a result of the fill).</param> /// <param name="TradeClosedIDs">Trade IDs of Trades closed when the Order was filled (only provided when the Order's state is FILLED and one or more Trades were closed as a result of the fill).</param> /// <param name="CancellingTransactionID">ID of the Transaction that cancelled the Order (only provided when the Order's state is CANCELLED).</param> /// <param name="CancelledTime">Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED).</param> /// <param name="ReplacesOrderID">The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace)..</param> /// <param name="ReplacedByOrderID">The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace)..</param> public LimitOrder(string Id = default(string), string CreateTime = default(string), StateEnum?State = default(StateEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), TypeEnum?Type = default(TypeEnum?), string Instrument = default(string), string Units = default(string), string Price = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), PositionFillEnum?PositionFill = default(PositionFillEnum?), TriggerConditionEnum?TriggerCondition = default(TriggerConditionEnum?), TakeProfitDetails TakeProfitOnFill = default(TakeProfitDetails), StopLossDetails StopLossOnFill = default(StopLossDetails), TrailingStopLossDetails TrailingStopLossOnFill = default(TrailingStopLossDetails), ClientExtensions TradeClientExtensions = default(ClientExtensions), string FillingTransactionID = default(string), string FilledTime = default(string), string TradeOpenedID = default(string), string TradeReducedID = default(string), List <string> TradeClosedIDs = default(List <string>), string CancellingTransactionID = default(string), string CancelledTime = default(string), string ReplacesOrderID = default(string), string ReplacedByOrderID = default(string)) { this.Id = Id; this.CreateTime = CreateTime; this.State = State; this.ClientExtensions = ClientExtensions; this.Type = Type; this.Instrument = Instrument; this.Units = Units; this.Price = Price; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.PositionFill = PositionFill; this.TriggerCondition = TriggerCondition; this.TakeProfitOnFill = TakeProfitOnFill; this.StopLossOnFill = StopLossOnFill; this.TrailingStopLossOnFill = TrailingStopLossOnFill; this.TradeClientExtensions = TradeClientExtensions; this.FillingTransactionID = FillingTransactionID; this.FilledTime = FilledTime; this.TradeOpenedID = TradeOpenedID; this.TradeReducedID = TradeReducedID; this.TradeClosedIDs = TradeClosedIDs; this.CancellingTransactionID = CancellingTransactionID; this.CancelledTime = CancelledTime; this.ReplacesOrderID = ReplacesOrderID; this.ReplacedByOrderID = ReplacedByOrderID; }
/// <summary> /// Initializes a new instance of the <see cref="TradeClientExtensionsModifyTransaction" /> class. /// </summary> /// <param name="Id">The Transaction's Identifier..</param> /// <param name="Time">The date/time when the Transaction was created..</param> /// <param name="UserID">The ID of the user that initiated the creation of the Transaction..</param> /// <param name="AccountID">The ID of the Account the Transaction was created for..</param> /// <param name="BatchID">The ID of the \"batch\" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously..</param> /// <param name="RequestID">The Request ID of the request which generated the transaction..</param> /// <param name="Type">The Type of the Transaction. Always set to \"TRADE_CLIENT_EXTENSIONS_MODIFY\" for a TradeClientExtensionsModifyTransaction..</param> /// <param name="TradeID">The ID of the Trade who's client extensions are to be modified..</param> /// <param name="ClientTradeID">The original Client ID of the Trade who's client extensions are to be modified..</param> /// <param name="TradeClientExtensionsModify">TradeClientExtensionsModify.</param> public TradeClientExtensionsModifyTransaction(string Id = default(string), string Time = default(string), int?UserID = default(int?), string AccountID = default(string), string BatchID = default(string), string RequestID = default(string), TypeEnum?Type = default(TypeEnum?), string TradeID = default(string), string ClientTradeID = default(string), ClientExtensions TradeClientExtensionsModify = default(ClientExtensions)) { this.Id = Id; this.Time = Time; this.UserID = UserID; this.AccountID = AccountID; this.BatchID = BatchID; this.RequestID = RequestID; this.Type = Type; this.TradeID = TradeID; this.ClientTradeID = ClientTradeID; this.TradeClientExtensionsModify = TradeClientExtensionsModify; }
/// <summary> /// Initializes a new instance of the <see cref="SetTradeClientExtensionsBody" /> class. /// </summary> /// <param name="ClientExtensions">ClientExtensions.</param> public SetTradeClientExtensionsBody(ClientExtensions ClientExtensions = default(ClientExtensions)) { this.ClientExtensions = ClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="TrailingStopLossDetails" /> class. /// </summary> /// <param name="Distance">The distance (in price units) from the Trade's fill price that the Trailing Stop Loss Order will be triggered at..</param> /// <param name="TimeInForce">The time in force for the created Trailing Stop Loss Order. This may only be GTC, GTD or GFD..</param> /// <param name="GtdTime">The date when the Trailing Stop Loss Order will be cancelled on if timeInForce is GTD..</param> /// <param name="ClientExtensions">ClientExtensions.</param> public TrailingStopLossDetails(string Distance = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), ClientExtensions ClientExtensions = default(ClientExtensions)) { this.Distance = Distance; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.ClientExtensions = ClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="StopLossDetails" /> class. /// </summary> /// <param name="Price">The price that the Stop Loss Order will be triggered at..</param> /// <param name="TimeInForce">The time in force for the created Stop Loss Order. This may only be GTC, GTD or GFD..</param> /// <param name="GtdTime">The date when the Stop Loss Order will be cancelled on if timeInForce is GTD..</param> /// <param name="ClientExtensions">ClientExtensions.</param> public StopLossDetails(string Price = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), ClientExtensions ClientExtensions = default(ClientExtensions)) { this.Price = Price; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.ClientExtensions = ClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="TakeProfitOrderRequest" /> class. /// </summary> /// <param name="Type">The type of the Order to Create. Must be set to \"TAKE_PROFIT\" when creating a Take Profit Order..</param> /// <param name="TradeID">The ID of the Trade to close when the price threshold is breached..</param> /// <param name="ClientTradeID">The client ID of the Trade to be closed when the price threshold is breached..</param> /// <param name="Price">The price threshold specified for the TakeProfit Order. The associated Trade will be closed by a market price that is equal to or better than this threshold..</param> /// <param name="TimeInForce">The time-in-force requested for the TakeProfit Order. Restricted to \"GTC\", \"GFD\" and \"GTD\" for TakeProfit Orders..</param> /// <param name="GtdTime">The date/time when the TakeProfit Order will be cancelled if its timeInForce is \"GTD\"..</param> /// <param name="TriggerCondition">Specification of what component of a price should be used for comparison when determining if the Order should be filled..</param> /// <param name="ClientExtensions">ClientExtensions.</param> public TakeProfitOrderRequest(TypeEnum?Type = default(TypeEnum?), string TradeID = default(string), string ClientTradeID = default(string), string Price = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string GtdTime = default(string), TriggerConditionEnum?TriggerCondition = default(TriggerConditionEnum?), ClientExtensions ClientExtensions = default(ClientExtensions)) { this.Type = Type; this.TradeID = TradeID; this.ClientTradeID = ClientTradeID; this.Price = Price; this.TimeInForce = TimeInForce; this.GtdTime = GtdTime; this.TriggerCondition = TriggerCondition; this.ClientExtensions = ClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="Trade" /> class. /// </summary> /// <param name="Id">The Trade's identifier, unique within the Trade's Account..</param> /// <param name="Instrument">The Trade's Instrument..</param> /// <param name="Price">The execution price of the Trade..</param> /// <param name="OpenTime">The date/time when the Trade was opened..</param> /// <param name="State">The current state of the Trade..</param> /// <param name="InitialUnits">The initial size of the Trade. Negative values indicate a short Trade, and positive values indicate a long Trade..</param> /// <param name="CurrentUnits">The number of units currently open for the Trade. This value is reduced to 0.0 as the Trade is closed..</param> /// <param name="RealizedPL">The total profit/loss realized on the closed portion of the Trade..</param> /// <param name="UnrealizedPL">The unrealized profit/loss on the open portion of the Trade..</param> /// <param name="AverageClosePrice">The average closing price of the Trade. Only present if the Trade has been closed or reduced at least once..</param> /// <param name="ClosingTransactionIDs">The IDs of the Transactions that have closed portions of this Trade..</param> /// <param name="Financing">The financing paid/collected for this Trade..</param> /// <param name="CloseTime">The date/time when the Trade was fully closed. Only provided for Trades whose state is CLOSED..</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="TakeProfitOrder">TakeProfitOrder.</param> /// <param name="StopLossOrder">StopLossOrder.</param> /// <param name="TrailingStopLossOrder">TrailingStopLossOrder.</param> public Trade(string Id = default(string), string Instrument = default(string), string Price = default(string), string OpenTime = default(string), StateEnum?State = default(StateEnum?), string InitialUnits = default(string), string CurrentUnits = default(string), string RealizedPL = default(string), string UnrealizedPL = default(string), string AverageClosePrice = default(string), List <string> ClosingTransactionIDs = default(List <string>), string Financing = default(string), string CloseTime = default(string), ClientExtensions ClientExtensions = default(ClientExtensions), TakeProfitOrder TakeProfitOrder = default(TakeProfitOrder), StopLossOrder StopLossOrder = default(StopLossOrder), TrailingStopLossOrder TrailingStopLossOrder = default(TrailingStopLossOrder)) { this.Id = Id; this.Instrument = Instrument; this.Price = Price; this.OpenTime = OpenTime; this.State = State; this.InitialUnits = InitialUnits; this.CurrentUnits = CurrentUnits; this.RealizedPL = RealizedPL; this.UnrealizedPL = UnrealizedPL; this.AverageClosePrice = AverageClosePrice; this.ClosingTransactionIDs = ClosingTransactionIDs; this.Financing = Financing; this.CloseTime = CloseTime; this.ClientExtensions = ClientExtensions; this.TakeProfitOrder = TakeProfitOrder; this.StopLossOrder = StopLossOrder; this.TrailingStopLossOrder = TrailingStopLossOrder; }
/// <summary> /// Initializes a new instance of the <see cref="MarketOrder" /> class. /// </summary> /// <param name="Id">The Order's identifier, unique within the Order's Account..</param> /// <param name="CreateTime">The time when the Order was created..</param> /// <param name="State">The current state of the Order..</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="Type">The type of the Order. Always set to \"MARKET\" for Market Orders..</param> /// <param name="Instrument">The Market Order's Instrument..</param> /// <param name="Units">The quantity requested to be filled by the Market Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order..</param> /// <param name="TimeInForce">The time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder..</param> /// <param name="PriceBound">The worst price that the client is willing to have the Market Order filled at..</param> /// <param name="PositionFill">Specification of how Positions in the Account are modified when the Order is filled..</param> /// <param name="TradeClose">TradeClose.</param> /// <param name="LongPositionCloseout">LongPositionCloseout.</param> /// <param name="ShortPositionCloseout">ShortPositionCloseout.</param> /// <param name="MarginCloseout">MarginCloseout.</param> /// <param name="DelayedTradeClose">DelayedTradeClose.</param> /// <param name="TakeProfitOnFill">TakeProfitOnFill.</param> /// <param name="StopLossOnFill">StopLossOnFill.</param> /// <param name="TrailingStopLossOnFill">TrailingStopLossOnFill.</param> /// <param name="TradeClientExtensions">TradeClientExtensions.</param> /// <param name="FillingTransactionID">ID of the Transaction that filled this Order (only provided when the Order's state is FILLED).</param> /// <param name="FilledTime">Date/time when the Order was filled (only provided when the Order's state is FILLED).</param> /// <param name="TradeOpenedID">Trade ID of Trade opened when the Order was filled (only provided when the Order's state is FILLED and a Trade was opened as a result of the fill).</param> /// <param name="TradeReducedID">Trade ID of Trade reduced when the Order was filled (only provided when the Order's state is FILLED and a Trade was reduced as a result of the fill).</param> /// <param name="TradeClosedIDs">Trade IDs of Trades closed when the Order was filled (only provided when the Order's state is FILLED and one or more Trades were closed as a result of the fill).</param> /// <param name="CancellingTransactionID">ID of the Transaction that cancelled the Order (only provided when the Order's state is CANCELLED).</param> /// <param name="CancelledTime">Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED).</param> public MarketOrder(string Id = default(string), string CreateTime = default(string), StateEnum?State = default(StateEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), TypeEnum?Type = default(TypeEnum?), string Instrument = default(string), string Units = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string PriceBound = default(string), PositionFillEnum?PositionFill = default(PositionFillEnum?), MarketOrderTradeClose TradeClose = default(MarketOrderTradeClose), MarketOrderPositionCloseout LongPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderPositionCloseout ShortPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderMarginCloseout MarginCloseout = default(MarketOrderMarginCloseout), MarketOrderDelayedTradeClose DelayedTradeClose = default(MarketOrderDelayedTradeClose), TakeProfitDetails TakeProfitOnFill = default(TakeProfitDetails), StopLossDetails StopLossOnFill = default(StopLossDetails), TrailingStopLossDetails TrailingStopLossOnFill = default(TrailingStopLossDetails), ClientExtensions TradeClientExtensions = default(ClientExtensions), string FillingTransactionID = default(string), string FilledTime = default(string), string TradeOpenedID = default(string), string TradeReducedID = default(string), List <string> TradeClosedIDs = default(List <string>), string CancellingTransactionID = default(string), string CancelledTime = default(string)) { this.Id = Id; this.CreateTime = CreateTime; this.State = State; this.ClientExtensions = ClientExtensions; this.Type = Type; this.Instrument = Instrument; this.Units = Units; this.TimeInForce = TimeInForce; this.PriceBound = PriceBound; this.PositionFill = PositionFill; this.TradeClose = TradeClose; this.LongPositionCloseout = LongPositionCloseout; this.ShortPositionCloseout = ShortPositionCloseout; this.MarginCloseout = MarginCloseout; this.DelayedTradeClose = DelayedTradeClose; this.TakeProfitOnFill = TakeProfitOnFill; this.StopLossOnFill = StopLossOnFill; this.TrailingStopLossOnFill = TrailingStopLossOnFill; this.TradeClientExtensions = TradeClientExtensions; this.FillingTransactionID = FillingTransactionID; this.FilledTime = FilledTime; this.TradeOpenedID = TradeOpenedID; this.TradeReducedID = TradeReducedID; this.TradeClosedIDs = TradeClosedIDs; this.CancellingTransactionID = CancellingTransactionID; this.CancelledTime = CancelledTime; }
/// <summary> /// Initializes a new instance of the <see cref="MarketOrderTransaction" /> class. /// </summary> /// <param name="Id">The Transaction's Identifier..</param> /// <param name="Time">The date/time when the Transaction was created..</param> /// <param name="UserID">The ID of the user that initiated the creation of the Transaction..</param> /// <param name="AccountID">The ID of the Account the Transaction was created for..</param> /// <param name="BatchID">The ID of the \"batch\" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously..</param> /// <param name="RequestID">The Request ID of the request which generated the transaction..</param> /// <param name="Type">The Type of the Transaction. Always set to \"MARKET_ORDER\" in a MarketOrderTransaction..</param> /// <param name="Instrument">The Market Order's Instrument..</param> /// <param name="Units">The quantity requested to be filled by the Market Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order..</param> /// <param name="TimeInForce">The time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder..</param> /// <param name="PriceBound">The worst price that the client is willing to have the Market Order filled at..</param> /// <param name="PositionFill">Specification of how Positions in the Account are modified when the Order is filled..</param> /// <param name="TradeClose">TradeClose.</param> /// <param name="LongPositionCloseout">LongPositionCloseout.</param> /// <param name="ShortPositionCloseout">ShortPositionCloseout.</param> /// <param name="MarginCloseout">MarginCloseout.</param> /// <param name="DelayedTradeClose">DelayedTradeClose.</param> /// <param name="Reason">The reason that the Market Order was created.</param> /// <param name="ClientExtensions">ClientExtensions.</param> /// <param name="TakeProfitOnFill">TakeProfitOnFill.</param> /// <param name="StopLossOnFill">StopLossOnFill.</param> /// <param name="TrailingStopLossOnFill">TrailingStopLossOnFill.</param> /// <param name="TradeClientExtensions">TradeClientExtensions.</param> public MarketOrderTransaction(string Id = default(string), string Time = default(string), int?UserID = default(int?), string AccountID = default(string), string BatchID = default(string), string RequestID = default(string), TypeEnum?Type = default(TypeEnum?), string Instrument = default(string), string Units = default(string), TimeInForceEnum?TimeInForce = default(TimeInForceEnum?), string PriceBound = default(string), PositionFillEnum?PositionFill = default(PositionFillEnum?), MarketOrderTradeClose TradeClose = default(MarketOrderTradeClose), MarketOrderPositionCloseout LongPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderPositionCloseout ShortPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderMarginCloseout MarginCloseout = default(MarketOrderMarginCloseout), MarketOrderDelayedTradeClose DelayedTradeClose = default(MarketOrderDelayedTradeClose), ReasonEnum?Reason = default(ReasonEnum?), ClientExtensions ClientExtensions = default(ClientExtensions), TakeProfitDetails TakeProfitOnFill = default(TakeProfitDetails), StopLossDetails StopLossOnFill = default(StopLossDetails), TrailingStopLossDetails TrailingStopLossOnFill = default(TrailingStopLossDetails), ClientExtensions TradeClientExtensions = default(ClientExtensions)) { this.Id = Id; this.Time = Time; this.UserID = UserID; this.AccountID = AccountID; this.BatchID = BatchID; this.RequestID = RequestID; this.Type = Type; this.Instrument = Instrument; this.Units = Units; this.TimeInForce = TimeInForce; this.PriceBound = PriceBound; this.PositionFill = PositionFill; this.TradeClose = TradeClose; this.LongPositionCloseout = LongPositionCloseout; this.ShortPositionCloseout = ShortPositionCloseout; this.MarginCloseout = MarginCloseout; this.DelayedTradeClose = DelayedTradeClose; this.Reason = Reason; this.ClientExtensions = ClientExtensions; this.TakeProfitOnFill = TakeProfitOnFill; this.StopLossOnFill = StopLossOnFill; this.TrailingStopLossOnFill = TrailingStopLossOnFill; this.TradeClientExtensions = TradeClientExtensions; }
/// <summary> /// Initializes a new instance of the <see cref="Order" /> class. /// </summary> /// <param name="Id">The Order's identifier, unique within the Order's Account..</param> /// <param name="CreateTime">The time when the Order was created..</param> /// <param name="State">The current state of the Order..</param> /// <param name="ClientExtensions">ClientExtensions.</param> public Order(string Id = default(string), string CreateTime = default(string), StateEnum?State = default(StateEnum?), ClientExtensions ClientExtensions = default(ClientExtensions)) { this.Id = Id; this.CreateTime = CreateTime; this.State = State; this.ClientExtensions = ClientExtensions; }