public static OrderInfo ReadFromJSON(string order, int orderId) { JObject o = JObject.Parse(order) as JObject; if (o == null) { return(null); } OrderInfo orderInfo = new OrderInfo() { Pair = BtcePairHelper.FromString(o.Value <string>("pair")), Type = TradeTypeHelper.FromString(o.Value <string>("type")), Amount = o.Value <decimal>("amount"), Rate = o.Value <decimal>("rate"), TimestampCreated = o.Value <UInt32>("timestamp_created"), Status = (BTCeOrderStatus)o.Value <int>("status"), Id = orderId }; return(orderInfo); }