예제 #1
0
 public static Transaction ReadFromJObject(JObject o)
 {
     if (o == null)
     {
         return(null);
     }
     return(new Transaction
     {
         Type = o.Value <int>("type"),
         Amount = o.Value <decimal>("amount"),
         Currency = BtceCurrencyHelper.FromString(o.Value <string>("currency")),
         Timestamp = o.Value <uint>("timestamp"),
         Status = o.Value <int>("status"),
         Description = o.Value <string>("desc")
     });
 }
예제 #2
0
        public static TradeInfo ReadFromJObject(JObject o)
        {
            if (o == null)
            {
                return(null);
            }

            return(new TradeInfo()
            {
                Amount = o.Value <decimal>("amount"),
                Price = o.Value <decimal>("price"),
                Date = UnixTime.ConvertToDateTime(o.Value <UInt32>("date")),
                Item = BtceCurrencyHelper.FromString(o.Value <string>("item")),
                PriceCurrency = BtceCurrencyHelper.FromString(o.Value <string>("price_currency")),
                Tid = o.Value <UInt32>("tid"),
                Type = TradeInfoTypeHelper.FromString(o.Value <string>("trade_type"))
            });
        }