Example #1
0
        public static TradeInfoV3 ReadFromJObject(JObject o)
        {
            if (o == null)
            {
                return(null);
            }

            return(new TradeInfoV3()
            {
                Amount = o.Value <decimal>("amount"),
                Price = o.Value <decimal>("price"),
                Timestamp = UnixTime.ConvertToDateTime(o.Value <UInt32>("timestamp")),
                Tid = o.Value <UInt32>("tid"),
                Type = TradeInfoTypeHelper.FromString(o.Value <string>("type"))
            });
        }
Example #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"))
            });
        }