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 <UInt32>("timestamp"),
         Status = o.Value <int>("status"),
         Description = o.Value <string>("desc")
     });
 }
Example #2
0
        public static TRADEINFORMATIONv2 ReadFromJObject(JObject o)
        {
            if (o == null)
            {
                return(null);
            }

            return(new TRADEINFORMATIONv2()
            {
                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 = TRADEINFORMATIONTYPEHELPER.FromString(o.Value <string>("trade_type"))
            });
        }