/// <summary> /// Initializes a new instance of the ExecutionReport class. /// </summary> /// <param name="type">A trade direction. Possible values include: /// 'Unknown', 'Buy', 'Sell'</param> /// <param name="time">Transaction time</param> /// <param name="price">An actual price of the execution or /// order</param> /// <param name="volume">Trade volume</param> /// <param name="fee">Execution fee</param> /// <param name="success">Indicates that operation was /// successful</param> /// <param name="executionStatus">Current status of the order. Possible /// values include: 'Unknown', 'Fill', 'PartialFill', 'Cancelled', /// 'Rejected', 'New', 'Pending'</param> /// <param name="failureType">Possible values include: 'None', /// 'Unknown', 'ExchangeError', 'ConnectorError', /// 'InsufficientFunds'</param> /// <param name="orderType">A type of the order. Possible values /// include: 'Unknown', 'Market', 'Limit'</param> /// <param name="execType">A type of the execution. ExecType = Trade /// means it is an execution, otherwise it is an order. Possible values /// include: 'Unknown', 'New', 'PartialFill', 'Fill', 'DoneForDay', /// 'Cancelled', 'Replace', 'PendingCancel', 'Stopped', 'Rejected', /// 'Suspended', 'PendingNew', 'Calculated', 'Expired', 'Restarted', /// 'PendingReplace', 'Trade', 'TradeCorrect', 'TradeCancel', /// 'OrderStatus'</param> /// <param name="clientOrderId">A client assigned ID of the /// order</param> /// <param name="exchangeOrderId">An exchange assigned ID of the /// order</param> /// <param name="instrument">An instrument description</param> /// <param name="feeCurrency">Fee currency</param> /// <param name="message">An arbitrary message from the exchange /// related to the execution|order</param> public ExecutionReport( TradeType type, DateTime time, double price, double volume, double fee, bool success, OrderExecutionStatus executionStatus, OrderStatusUpdateFailureType failureType, OrderType orderType, ExecType execType, string clientOrderId = null, string exchangeOrderId = null, Instrument instrument = null, string feeCurrency = null, string message = null) { this.ClientOrderId = clientOrderId; this.ExchangeOrderId = exchangeOrderId; this.Instrument = instrument; this.Type = type; this.Time = time; this.Price = price; this.Volume = volume; this.Fee = fee; this.FeeCurrency = feeCurrency; this.Success = success; this.ExecutionStatus = executionStatus; this.FailureType = failureType; this.Message = message; this.OrderType = orderType; this.ExecType = execType; }
internal static string ToSerializedValue(this OrderExecutionStatus value) { switch (value) { case OrderExecutionStatus.Unknown: return("Unknown"); case OrderExecutionStatus.Fill: return("Fill"); case OrderExecutionStatus.PartialFill: return("PartialFill"); case OrderExecutionStatus.Cancelled: return("Cancelled"); case OrderExecutionStatus.Rejected: return("Rejected"); case OrderExecutionStatus.New: return("New"); case OrderExecutionStatus.Pending: return("Pending"); } return(null); }
public ExecutionReport(Instrument instrument, DateTime time, decimal price, decimal volume, TradeType type, string orderId, OrderExecutionStatus executionStatus) { Instrument = instrument; Time = time; Price = price; Volume = volume; Type = type; Fee = 0; // TODO ExchangeOrderId = orderId; ExecutionStatus = executionStatus; }
/// <summary> /// Initializes a new instance of the ExecutionReport class. /// </summary> /// <param name="type">A trade direction. Possible values include: /// 'Unknown', 'Buy', 'Sell'</param> /// <param name="time">Transaction time</param> /// <param name="price">An actual price of the execution or /// order</param> /// <param name="volume">Trade volume</param> /// <param name="fee">Execution fee</param> /// <param name="success">Indicates that operation was /// successful</param> /// <param name="executionStatus">Current status of the order. Possible /// values include: 'Unknown', 'Fill', 'PartialFill', 'Cancelled', /// 'Rejected', 'New', 'Pending'</param> /// <param name="failureType">Possible values include: 'None', /// 'Unknown', 'ExchangeError', 'ConnectorError', /// 'InsufficientFunds'</param> /// <param name="orderType">A type of the order. Possible values /// include: 'Unknown', 'Market', 'Limit'</param> /// <param name="execType">A type of the execution. ExecType = Trade /// means it is an execution, otherwise it is an order. Possible values /// include: 'Unknown', 'New', 'PartialFill', 'Fill', 'DoneForDay', /// 'Cancelled', 'Replace', 'PendingCancel', 'Stopped', 'Rejected', /// 'Suspended', 'PendingNew', 'Calculated', 'Expired', 'Restarted', /// 'PendingReplace', 'Trade', 'TradeCorrect', 'TradeCancel', /// 'OrderStatus'</param> /// <param name="clientOrderId">A client assigned ID of the /// order</param> /// <param name="exchangeOrderId">An exchange assigned ID of the /// order</param> /// <param name="instrument">An instrument description</param> /// <param name="feeCurrency">Fee currency</param> /// <param name="message">An arbitrary message from the exchange /// related to the execution|order</param> public ExecutionReport(TradeType type, System.DateTime time, double price, double volume, double fee, bool success, OrderExecutionStatus executionStatus, OrderStatusUpdateFailureType failureType, OrderType orderType, ExecType execType, string clientOrderId = default(string), string exchangeOrderId = default(string), Instrument instrument = default(Instrument), string feeCurrency = default(string), string message = default(string)) { ClientOrderId = clientOrderId; ExchangeOrderId = exchangeOrderId; Instrument = instrument; Type = type; Time = time; Price = price; Volume = volume; Fee = fee; FeeCurrency = feeCurrency; Success = success; ExecutionStatus = executionStatus; FailureType = failureType; Message = message; OrderType = orderType; ExecType = execType; CustomInit(); }