Exemplo n.º 1
0
 public static OrderViewModel Create(ExchangeBase exchange, OpenOrderEntryModel model)
 {
     return(new OrderViewModel(exchange)
     {
         OrderId = model.OrderId,
         Pair = exchange.PairManager.GetPair(model.Symbol),
         ExchangeName = model.ExchangeString,
         Price = model.Price,
         AvgerageExecutionPrice = model.AverageExecutionPrice,
         Type = model.Type,
         DateTime = model.DateTime,
         Status = model.OrderStatus,
         ExecutedAmount = model.ExecutedAmount,
         RemainingAmount = model.RemainingAmount,
         OriginalAmount = model.OriginalAmount
     });
 }
Exemplo n.º 2
0
        public OpenOrderEntryModel Transform()
        {
            var m = new OpenOrderEntryModel
            {
                OrderId               = Txid,
                OrderStatus           = Status,
                AverageExecutionPrice = Price,
                DateTime              = DateTimeConverter.ConvertTimestamp(Opentm),
                OriginalAmount        = Vol,
                ExecutedAmount        = VolExec,
                Price           = Description.Price,
                RemainingAmount = Vol,
                Symbol          = Description.Pair,
                Type            = Description.Type,
            };

            return(m);
        }