Esempio n. 1
0
 /// <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;
 }
 /// <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();
 }
        internal static string ToSerializedValue(this OrderStatusUpdateFailureType value)
        {
            switch (value)
            {
            case OrderStatusUpdateFailureType.None:
                return("None");

            case OrderStatusUpdateFailureType.Unknown:
                return("Unknown");

            case OrderStatusUpdateFailureType.ExchangeError:
                return("ExchangeError");

            case OrderStatusUpdateFailureType.ConnectorError:
                return("ConnectorError");

            case OrderStatusUpdateFailureType.InsufficientFunds:
                return("InsufficientFunds");
            }
            return(null);
        }