Ejemplo n.º 1
0
 public static OrderClientContract ToClientContract(this OrderBackendContract src)
 {
     return(new OrderClientContract
     {
         Id = src.Id,
         AccountId = src.AccountId,
         Instrument = src.Instrument,
         Type = (int)src.Type,
         Status = (int)src.Status,
         CloseReason = (int)src.CloseReason,
         RejectReason = (int)src.RejectReason,
         RejectReasonText = src.RejectReasonText,
         ExpectedOpenPrice = src.ExpectedOpenPrice,
         OpenPrice = src.OpenPrice,
         ClosePrice = src.ClosePrice,
         OpenDate = src.OpenDate,
         CloseDate = src.CloseDate,
         Volume = src.Volume,
         MatchedVolume = src.MatchedVolume,
         MatchedCloseVolume = src.MatchedCloseVolume,
         TakeProfit = src.TakeProfit,
         StopLoss = src.StopLoss,
         //TODO: fix Fpl value in OrderBackendContract in task LWDEV-3661
         Fpl = src.Fpl,
         TotalPnL = src.Fpl,
         OpenCommission = src.OpenCommission,
         CloseCommission = src.CloseCommission,
         SwapCommission = src.SwapCommission
     });
 }
 /// <summary>
 /// Initializes a new instance of the OpenOrderBackendResponse class.
 /// </summary>
 public OpenOrderBackendResponse(OrderBackendContract order = default(OrderBackendContract))
 {
     Order = order;
 }