/// <summary> /// Returns the list of active markets /// </summary> /// <returns></returns> public CallResult <List <ActiveMarket> > GetActiveMarkets() { return(MakePostRequest("getmarkets", result => { List <ActiveMarket> markets = new List <ActiveMarket>(); foreach (var o in result) { markets.Add(ActiveMarket.CreateFromJObject(o as JObject)); } return markets; } /*, * new Dictionary<string, string> { { "marketid", pair.ID } }*/)); }
public static ActiveMarket CreateFromJObject(JObject o) { if (o == null) { return null; } var m = new ActiveMarket() { ID = o.Value<string>("marketid"), Label = o.Value<string>("label"), Volume = o.Value<decimal>("current_volume"), High = o.Value<decimal>("high_trade"), Low = o.Value<decimal>("low_trade"), Last = o.Value<decimal>("last_trade") }; return m; }
public static ActiveMarket CreateFromJObject(JObject o) { if (o == null) { return(null); } var m = new ActiveMarket() { ID = o.Value <string>("marketid"), Label = o.Value <string>("label"), Volume = o.Value <decimal>("current_volume"), High = o.Value <decimal>("high_trade"), Low = o.Value <decimal>("low_trade"), Last = o.Value <decimal>("last_trade") }; return(m); }