/// <summary>
 /// Initializes a new instance of the <see cref="ClosePositionRequest" /> class.
 /// </summary>
 /// <param name="longUnits">Either \&quot;ALL\&quot;, \&quot;NONE\&quot;, or a DecimalNumber reflection a partial unit.</param>
 /// <param name="longClientExtensions">longClientExtensions.</param>
 /// <param name="shortUnits">Either \&quot;ALL\&quot;, \&quot;NONE\&quot;, or a DecimalNumber reflection a partial unit.</param>
 /// <param name="shortClientExtensions">shortClientExtensions.</param>
 public ClosePositionRequest(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;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Order" /> class.
 /// </summary>
 /// <param name="id">The Order&#39;s identifier, unique within the Order&#39;s Account..</param>
 /// <param name="createTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="state">state.</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 public Order(int id = default(int), string createTime = default(string), OrderState?state = default(OrderState?), ClientExtensions clientExtensions = default(ClientExtensions))
 {
     this.Id               = id;
     this.CreateTime       = createTime;
     this.State            = state;
     this.ClientExtensions = clientExtensions;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Trade" /> class.
 /// </summary>
 /// <param name="id">The Trade&#39;s identifier, unique within the Trade&#39;s Account..</param>
 /// <param name="instrument">instrument.</param>
 /// <param name="price">The execution price of the Trade..</param>
 /// <param name="openTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="state">state.</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="initialMarginRequired">The margin required at the time the Trade was created. Note, this is the &#39;pure&#39; margin required, it is not the &#39;effective&#39; margin used that factors in the trade risk if a GSLO is attached to the 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="marginUsed">Margin currently used by 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">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 /// <param name="takeProfitOrder">takeProfitOrder.</param>
 /// <param name="stopLossOrder">stopLossOrder.</param>
 /// <param name="trailingStopLossOrder">trailingStopLossOrder.</param>
 public Trade(int id = default(int), InstrumentName?instrument = default(InstrumentName?), double price = default(double), string openTime = default(string), TradeState?state = default(TradeState?), double initialUnits = default(double), double initialMarginRequired = default(double), double currentUnits = default(double), double realizedPL = default(double), double unrealizedPL = default(double), double marginUsed = default(double), double averageClosePrice = default(double), List <int> closingTransactionIDs = default(List <int>), double financing = default(double), 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.InitialMarginRequired = initialMarginRequired;
     this.CurrentUnits          = currentUnits;
     this.RealizedPL            = realizedPL;
     this.UnrealizedPL          = unrealizedPL;
     this.MarginUsed            = marginUsed;
     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="StopLossDetails" /> class.
 /// </summary>
 /// <param name="price">The price that the Stop Loss Order will be triggered at. Only one of the price and distance fields may be specified..</param>
 /// <param name="distance">Specifies the distance (in price units) from the Trade&#39;s open price to use as the Stop Loss Order price. Only one of the distance and price fields may be specified..</param>
 /// <param name="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 /// <param name="guaranteed">Flag indicating that the price for the Stop Loss Order is guaranteed. The default value depends on the GuaranteedStopLossOrderMode of the account, if it is REQUIRED, the default will be true, for DISABLED or ENABLED the default is false..</param>
 public StopLossDetails(double price = default(double), double distance = default(double), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), ClientExtensions clientExtensions = default(ClientExtensions), bool guaranteed = default(bool))
 {
     this.Price            = price;
     this.Distance         = distance;
     this.TimeInForce      = timeInForce;
     this.GtdTime          = gtdTime;
     this.ClientExtensions = clientExtensions;
     this.Guaranteed       = guaranteed;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StopLossOrder" /> class.
 /// </summary>
 /// <param name="id">The Order&#39;s identifier, unique within the Order&#39;s Account..</param>
 /// <param name="createTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="state">state.</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 /// <param name="type">The type of the 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="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="triggerCondition">triggerCondition.</param>
 /// <param name="fillingTransactionID">ID of the Transaction that filled this Order (only provided when the Order&#39;s state is FILLED).</param>
 /// <param name="filledTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="tradeOpenedID">Trade ID of Trade opened when the Order was filled (only provided when the Order&#39;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&#39;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&#39;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&#39;s state is CANCELLED).</param>
 /// <param name="cancelledTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</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>
 /// <param name="price">The price threshold specified for the Stop Loss Order. If the guaranteed flag is false, the associated Trade will be closed by a market price that is equal to or worse than this threshold. If the flag is true the associated Trade will be closed at this price..</param>
 /// <param name="guaranteedExecutionPremium">The premium that will be charged if the Stop Loss Order is guaranteed and the Order is filled at the guaranteed price. It is in price units and is charged for each unit of the Trade..</param>
 /// <param name="distance">Specifies the distance (in price units) from the Account&#39;s current price to use as the Stop Loss Order price. If the Trade is short the Instrument&#39;s bid price is used, and for long Trades the ask is used..</param>
 /// <param name="guaranteed">Flag indicating that the Stop Loss Order is guaranteed. The default value depends on the GuaranteedStopLossOrderMode of the account, if it is REQUIRED, the default will be true, for DISABLED or ENABLED the default is false..</param>
 public StopLossOrder(int id = default(int), string createTime = default(string), OrderState?state = default(OrderState?), ClientExtensions clientExtensions = default(ClientExtensions), TypeEnum?type = default(TypeEnum?), int tradeID = default(int), string clientTradeID = default(string), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), TradeOrderTriggerCondition?triggerCondition = default(TradeOrderTriggerCondition?), int fillingTransactionID = default(int), string filledTime = default(string), int tradeOpenedID = default(int), int tradeReducedID = default(int), List <int> tradeClosedIDs = default(List <int>), int cancellingTransactionID = default(int), string cancelledTime = default(string), int replacesOrderID = default(int), int replacedByOrderID = default(int), double price = default(double), double guaranteedExecutionPremium = default(double), double distance = default(double), bool guaranteed = default(bool))
 {
     this.Id                         = id;
     this.CreateTime                 = createTime;
     this.State                      = state;
     this.ClientExtensions           = clientExtensions;
     this.Type                       = type;
     this.TradeID                    = tradeID;
     this.ClientTradeID              = clientTradeID;
     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;
     this.Price                      = price;
     this.GuaranteedExecutionPremium = guaranteedExecutionPremium;
     this.Distance                   = distance;
     this.Guaranteed                 = guaranteed;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TakeProfitDetails" /> class.
 /// </summary>
 /// <param name="price">The price that the Take Profit Order will be triggered at. Only one of the price and distance fields may be specified..</param>
 /// <param name="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 public TakeProfitDetails(double price = default(double), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), 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="MarketOrder" /> class.
 /// </summary>
 /// <param name="instrument">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">timeInForce.</param>
 /// <param name="priceBound">The worst price that the client is willing to have the Market Order filled at..</param>
 /// <param name="positionFill">positionFill.</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">reason.</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 MarketOrder(InstrumentName?instrument = default(InstrumentName?), double units = default(double), MarketOrderTradeClose timeInForce = default(MarketOrderTradeClose), double priceBound = default(double), MarketOrderPositionFill?positionFill = default(MarketOrderPositionFill?), MarketOrderTradeClose tradeClose = default(MarketOrderTradeClose), MarketOrderPositionCloseout longPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderPositionCloseout shortPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderMarginCloseout marginCloseout = default(MarketOrderMarginCloseout), MarketOrderDelayedTradeClose delayedTradeClose = default(MarketOrderDelayedTradeClose), MarketOrderReason?reason = default(MarketOrderReason?), ClientExtensions clientExtensions = default(ClientExtensions), TakeProfitDetails takeProfitOnFill = default(TakeProfitDetails), StopLossDetails stopLossOnFill = default(StopLossDetails), TrailingStopLossDetails trailingStopLossOnFill = default(TrailingStopLossDetails), ClientExtensions tradeClientExtensions = default(ClientExtensions))
 {
     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="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="price">The average price that the units were opened at..</param>
 /// <param name="guaranteedExecutionFee">This is the fee charged for opening the trade if it has a guaranteed Stop Loss Order attached to it..</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 /// <param name="halfSpreadCost">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..</param>
 /// <param name="initialMarginRequired">The margin required at the time the Trade was created. Note, this is the &#39;pure&#39; margin required, it is not the &#39;effective&#39; margin used that factors in the trade risk if a GSLO is attached to the trade..</param>
 public TradeOpen(int tradeID = default(int), double units = default(double), double price = default(double), double guaranteedExecutionFee = default(double), ClientExtensions clientExtensions = default(ClientExtensions), double halfSpreadCost = default(double), double initialMarginRequired = default(double))
 {
     this.TradeID = tradeID;
     this.Units   = units;
     this.Price   = price;
     this.GuaranteedExecutionFee = guaranteedExecutionFee;
     this.ClientExtensions       = clientExtensions;
     this.HalfSpreadCost         = halfSpreadCost;
     this.InitialMarginRequired  = initialMarginRequired;
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TradeClientExtensionsModify" /> class.
 /// </summary>
 /// <param name="tradeID">The ID of the Trade who&#39;s client extensions are to be modified..</param>
 /// <param name="clientTradeID">The original Client ID of the Trade who&#39;s client extensions are to be modified..</param>
 /// <param name="tradeClientExtensionsModify">tradeClientExtensionsModify.</param>
 public TradeClientExtensionsModify(int tradeID = default(int), string clientTradeID = default(string), ClientExtensions tradeClientExtensionsModify = default(ClientExtensions))
 {
     this.TradeID       = tradeID;
     this.ClientTradeID = clientTradeID;
     this._TradeClientExtensionsModify = tradeClientExtensionsModify;
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TrailingStopLossOrderTransactionBase" /> class.
 /// </summary>
 /// <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">Specifies the distance (in price units) from the Account&#39;s current price to use as the Stop Loss Order price. If the Trade is short the Instrument&#39;s bid price is used, and for long Trades the ask is used..</param>
 /// <param name="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="triggerCondition">triggerCondition.</param>
 /// <param name="reason">reason.</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 TrailingStopLossOrderTransactionBase(int tradeID = default(int), string clientTradeID = default(string), double distance = default(double), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), TradeOrderTriggerCondition?triggerCondition = default(TradeOrderTriggerCondition?), TradeOrderTransactionReason?reason = default(TradeOrderTransactionReason?), ClientExtensions clientExtensions = default(ClientExtensions), int orderFillTransactionID = default(int), int replacesOrderID = default(int), int cancellingTransactionID = default(int))
 {
     this.TradeID                 = tradeID;
     this.ClientTradeID           = clientTradeID;
     this.Distance                = distance;
     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="StopLossOrderTransactionBase" /> class.
 /// </summary>
 /// <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 Stop Loss Order. If the guaranteed flag is false, the associated Trade will be closed by a market price that is equal to or worse than this threshold. If the flag is true the associated Trade will be closed at this price..</param>
 /// <param name="distance">Specifies the distance (in price units) from the Account&#39;s current price to use as the Stop Loss Order price. If the Trade is short the Instrument&#39;s bid price is used, and for long Trades the ask is used..</param>
 /// <param name="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="triggerCondition">triggerCondition.</param>
 /// <param name="guaranteed">Flag indicating that the Stop Loss Order is guaranteed. The default value depends on the GuaranteedStopLossOrderMode of the account, if it is REQUIRED, the default will be true, for DISABLED or ENABLED the default is false..</param>
 /// <param name="guaranteedExecutionPremium">The fee that will be charged if the Stop Loss Order is guaranteed and the Order is filled at the guaranteed price. The value is determined at Order creation time. It is in price units and is charged for each unit of the Trade..</param>
 /// <param name="reason">reason.</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 StopLossOrderTransactionBase(int tradeID = default(int), string clientTradeID = default(string), double price = default(double), double distance = default(double), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), TradeOrderTriggerCondition?triggerCondition = default(TradeOrderTriggerCondition?), bool guaranteed = default(bool), double guaranteedExecutionPremium = default(double), TradeOrderTransactionReason?reason = default(TradeOrderTransactionReason?), ClientExtensions clientExtensions = default(ClientExtensions), int orderFillTransactionID = default(int), int replacesOrderID = default(int), int cancellingTransactionID = default(int))
 {
     this.TradeID                    = tradeID;
     this.ClientTradeID              = clientTradeID;
     this.Price                      = price;
     this.Distance                   = distance;
     this.TimeInForce                = timeInForce;
     this.GtdTime                    = gtdTime;
     this.TriggerCondition           = triggerCondition;
     this.Guaranteed                 = guaranteed;
     this.GuaranteedExecutionPremium = guaranteedExecutionPremium;
     this.Reason                     = reason;
     this.ClientExtensions           = clientExtensions;
     this.OrderFillTransactionID     = orderFillTransactionID;
     this.ReplacesOrderID            = replacesOrderID;
     this.CancellingTransactionID    = cancellingTransactionID;
 }
Esempio n. 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TradeClientExtensionsModifyTransaction" /> class.
 /// </summary>
 /// <param name="id">The Transaction&#39;s Identifier..</param>
 /// <param name="time">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="userID">The ID of the user that initiated the creation of the Transaction..</param>
 /// <param name="accountID">The Account&#39;s identifier.</param>
 /// <param name="batchID">The ID of the \&quot;batch\&quot; 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">type.</param>
 /// <param name="tradeID">The ID of the Trade who&#39;s client extensions are to be modified..</param>
 /// <param name="clientTradeID">The original Client ID of the Trade who&#39;s client extensions are to be modified..</param>
 /// <param name="tradeClientExtensionsModify">tradeClientExtensionsModify.</param>
 public TradeClientExtensionsModifyTransaction(int id = default(int), string time = default(string), int userID = default(int), string accountID = default(string), int batchID = default(int), string requestID = default(string), TransactionType?type = default(TransactionType?), int tradeID = default(int), 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="OrderExtensionsRequest" /> class.
 /// </summary>
 /// <param name="clientExtensions">clientExtensions.</param>
 /// <param name="tradeClientExtensions">tradeClientExtensions.</param>
 public OrderExtensionsRequest(ClientExtensions clientExtensions = default(ClientExtensions), ClientExtensions tradeClientExtensions = default(ClientExtensions))
 {
     this.ClientExtensions      = clientExtensions;
     this.TradeClientExtensions = tradeClientExtensions;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TrailingStopLossDetails" /> class.
 /// </summary>
 /// <param name="distance">The distance (in price units) from the Trade&#39;s fill price that the Trailing Stop Loss Order will be triggered at..</param>
 /// <param name="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 public TrailingStopLossDetails(double distance = default(double), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), ClientExtensions clientExtensions = default(ClientExtensions))
 {
     this.Distance         = distance;
     this.TimeInForce      = timeInForce;
     this.GtdTime          = gtdTime;
     this.ClientExtensions = clientExtensions;
 }
Esempio n. 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderClientExtensionsModify" /> class.
 /// </summary>
 /// <param name="orderID">The ID of the Order who&#39;s client extensions are to be modified..</param>
 /// <param name="clientOrderID">The original Client ID of the Order who&#39;s client extensions are to be modified..</param>
 /// <param name="clientExtensionsModify">clientExtensionsModify.</param>
 /// <param name="tradeClientExtensionsModify">tradeClientExtensionsModify.</param>
 public OrderClientExtensionsModify(int orderID = default(int), string clientOrderID = default(string), ClientExtensions clientExtensionsModify = default(ClientExtensions), ClientExtensions tradeClientExtensionsModify = default(ClientExtensions))
 {
     this.OrderID                     = orderID;
     this.ClientOrderID               = clientOrderID;
     this.ClientExtensionsModify      = clientExtensionsModify;
     this.TradeClientExtensionsModify = tradeClientExtensionsModify;
 }
Esempio n. 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TakeProfitOrderTransaction" /> class.
 /// </summary>
 /// <param name="id">The Transaction&#39;s Identifier..</param>
 /// <param name="time">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="userID">The ID of the user that initiated the creation of the Transaction..</param>
 /// <param name="accountID">The Account&#39;s identifier.</param>
 /// <param name="batchID">The ID of the \&quot;batch\&quot; 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">type.</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 Stop Loss Order. If the guaranteed flag is false, the associated Trade will be closed by a market price that is equal to or worse than this threshold. If the flag is true the associated Trade will be closed at this price..</param>
 /// <param name="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="triggerCondition">triggerCondition.</param>
 /// <param name="reason">reason.</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(int id = default(int), string time = default(string), int userID = default(int), string accountID = default(string), int batchID = default(int), string requestID = default(string), TransactionType?type = default(TransactionType?), int tradeID = default(int), string clientTradeID = default(string), double price = default(double), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), TradeOrderTriggerCondition?triggerCondition = default(TradeOrderTriggerCondition?), TradeOrderTransactionReason?reason = default(TradeOrderTransactionReason?), ClientExtensions clientExtensions = default(ClientExtensions), int orderFillTransactionID = default(int), int replacesOrderID = default(int), int cancellingTransactionID = default(int))
 {
     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="MarketOrderTransaction" /> class.
 /// </summary>
 /// <param name="id">The Transaction&#39;s Identifier..</param>
 /// <param name="time">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="userID">The ID of the user that initiated the creation of the Transaction..</param>
 /// <param name="accountID">The Account&#39;s identifier.</param>
 /// <param name="batchID">The ID of the \&quot;batch\&quot; 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">type.</param>
 /// <param name="instrument">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">timeInForce.</param>
 /// <param name="priceBound">The worst price that the client is willing to have the Market Order filled at..</param>
 /// <param name="positionFill">positionFill.</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">reason.</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(int id = default(int), string time = default(string), int userID = default(int), string accountID = default(string), int batchID = default(int), string requestID = default(string), TransactionType?type = default(TransactionType?), InstrumentName?instrument = default(InstrumentName?), double units = default(double), MarketOrderTradeClose timeInForce = default(MarketOrderTradeClose), double priceBound = default(double), MarketOrderPositionFill?positionFill = default(MarketOrderPositionFill?), MarketOrderTradeClose tradeClose = default(MarketOrderTradeClose), MarketOrderPositionCloseout longPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderPositionCloseout shortPositionCloseout = default(MarketOrderPositionCloseout), MarketOrderMarginCloseout marginCloseout = default(MarketOrderMarginCloseout), MarketOrderDelayedTradeClose delayedTradeClose = default(MarketOrderDelayedTradeClose), MarketOrderReason?reason = default(MarketOrderReason?), 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;
 }
Esempio n. 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TradeOrderBase" /> class.
 /// </summary>
 /// <param name="id">The Order&#39;s identifier, unique within the Order&#39;s Account..</param>
 /// <param name="createTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="state">state.</param>
 /// <param name="clientExtensions">clientExtensions.</param>
 /// <param name="type">The type of the 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="timeInForce">timeInForce.</param>
 /// <param name="gtdTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="triggerCondition">triggerCondition.</param>
 /// <param name="fillingTransactionID">ID of the Transaction that filled this Order (only provided when the Order&#39;s state is FILLED).</param>
 /// <param name="filledTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</param>
 /// <param name="tradeOpenedID">Trade ID of Trade opened when the Order was filled (only provided when the Order&#39;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&#39;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&#39;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&#39;s state is CANCELLED).</param>
 /// <param name="cancelledTime">A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)..</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 TradeOrderBase(int id = default(int), string createTime = default(string), OrderState?state = default(OrderState?), ClientExtensions clientExtensions = default(ClientExtensions), TypeEnum?type = default(TypeEnum?), int tradeID = default(int), string clientTradeID = default(string), TradeOrderTimeInForce?timeInForce = default(TradeOrderTimeInForce?), string gtdTime = default(string), TradeOrderTriggerCondition?triggerCondition = default(TradeOrderTriggerCondition?), int fillingTransactionID = default(int), string filledTime = default(string), int tradeOpenedID = default(int), int tradeReducedID = default(int), List <int> tradeClosedIDs = default(List <int>), int cancellingTransactionID = default(int), string cancelledTime = default(string), int replacesOrderID = default(int), int replacedByOrderID = default(int))
 {
     this.Id                      = id;
     this.CreateTime              = createTime;
     this.State                   = state;
     this.ClientExtensions        = clientExtensions;
     this.Type                    = type;
     this.TradeID                 = tradeID;
     this.ClientTradeID           = clientTradeID;
     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;
 }
Esempio n. 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TradeExtensionsRequest" /> class.
 /// </summary>
 /// <param name="clientExtensions">clientExtensions.</param>
 public TradeExtensionsRequest(ClientExtensions clientExtensions = default(ClientExtensions))
 {
     this.ClientExtensions = clientExtensions;
 }