コード例 #1
0
ファイル: Execution.cs プロジェクト: qadmium/ibapi
        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;
        }
コード例 #2
0
ファイル: ExecutionsStorage.cs プロジェクト: qadmium/ibapi
 private void OnExecutionData(ExecutionDataMessage message)
 {
     var execution = Execution.FromMessage(message, this.accountName);
     this.executions.Add(execution);
     this.ExecutionAdded(this, new ExecutionAddedEventArgs{Execution = execution});
 }
コード例 #3
0
 private void OnExecutionData(ExecutionDataMessage message)
 {
     this.executions.Add(Execution.FromMessage(message, this.account));
 }