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") }); }
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")) }); }