public TradeExecution(TDExecutionLeg exe, TDOrder order) { TradeType = GetExecutionSide(order); Shares = exe.quantity; Price = exe.price; OrderID = order.orderId; Time = exe.time; Side = GetExecutionSide(order); }
private string GetExecutionSide(TDOrder order) { string side = order.orderLegCollection[0].instruction; if (side == TDConstantVal.OrderTradeType_Buy) { return(Constant.ExecutionBuy); } else if (side == TDConstantVal.OrderTradeType_Sell) { return(Constant.ExecutionSell); } else { return("UNKNOWN"); } }