Example #1
0
 public TradeExecution(TDExecutionLeg exe, TDOrder order)
 {
     TradeType = GetExecutionSide(order);
     Shares    = exe.quantity;
     Price     = exe.price;
     OrderID   = order.orderId;
     Time      = exe.time;
     Side      = GetExecutionSide(order);
 }
Example #2
0
        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");
            }
        }