csharp/aabiryukov/CryptoMarketApi/Api/BtcChinaApi/Ticker.cs

Ticker.cs
using Newtonsoft.Json.Linq;
using System;

namespace BTCChina
{
	public clast Ticker
	{
		public decimal Average { get; private set; }
		public decimal Buy { get; private set; }
		public decimal High { get; private set; }
		public decimal Last { get; private set; }
		public decimal Low { get; private set; }
		public decimal Sell { get; private set; }
		public decimal Volume { get; private set; }
//		public decimal PreviousClose { get; private set; }
		public decimal Open { get; private set; }
		
		public UInt32 ServerTime { get; private set; }
		public static Ticker ReadFromJObject(JToken o) {
			if ( o == null )
				return null;
			return new Ticker() {
				Average = o.Value("vwap"),
				Buy = o.Value("buy"),
				High = o.Value("high"),
				Last = o.Value("last"),
				Low = o.Value("low"),
				Sell = o.Value("sell"),
				Volume = o.Value("vol"),
				Open = o.Value("open"),
//				PreviousClose = o.Value("prev_close"),
				ServerTime = o.Value("date"),
			};
		}
	}
}