public ExecutionView(Execution execution) { this.Symbol = execution.Contract.Symbol; this.Id = execution.Id; this.Account = execution.Account; this.Buy = execution.Buy; this.Exchange = execution.Exchange; this.OrderId = execution.OrderId; this.AveragePrice = execution.AveragePrice; this.Price = execution.Price; this.CumQuantity = execution.CumQuantity; this.Quantity = execution.Quantity; this.Time = execution.Time; }
internal static Execution FromMessage(ExecutionDataMessage message, string account) { var executionTime = DateTime.ParseExact(message.ExecutionTime, "yyyyMMdd HH:mm:ss", CultureInfo.InvariantCulture); var execution = new Execution { Account = account, Buy = message.Side == "BOT", Exchange = message.ExecutionExchange, Id = message.ExecutionId, OrderId = message.OrderId, Price = message.Price, AveragePrice = message.AveragePrice, CumQuantity = message.CumQty, Quantity = message.Shares, Time = executionTime, Contract = Contract.FromExecutionDataMessage(message) }; return execution; }