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; }
private void OnExecutionData(ExecutionDataMessage message) { var execution = Execution.FromMessage(message, this.accountName); this.executions.Add(execution); this.ExecutionAdded(this, new ExecutionAddedEventArgs{Execution = execution}); }
private void OnExecutionData(ExecutionDataMessage message) { this.executions.Add(Execution.FromMessage(message, this.account)); }