Beispiel #1
0
        public static Ticker CreateFromJObject(JObject o)
        {
            if (o == null)
            {
                return null;
            }

            var tick = new Ticker()
            {
                Bid = o.Value<decimal>("bid"),
                Ask = o.Value<decimal>("ask"),
                Volume = o.Value<decimal>("volume"),
                High = o.Value<decimal>("high"),
                Low = o.Value<decimal>("low"),
                Last = o.Value<decimal>("last")
            };

            return tick;
        }
Beispiel #2
0
 /// <summary>
 /// Gets Bitstamp's ticker
 /// </summary>
 /// <returns></returns>
 public CallResult <Ticker> GetTicker()
 {
     return(MakeGetRequest <Ticker>("ticker/", result => Ticker.CreateFromJObject(result as JObject)));
 }