public static KunaOrderBook GetOrderBook(string market) { var tickerResponse = Query(_baseUri + "order_book?market=" + market); var json = JObject.Parse(tickerResponse); return(KunaOrderBook.FromJson(json)); }
public static KunaOrderBook FromJson(JObject json) { var res = new KunaOrderBook(); foreach (JObject orderJson in (json["asks"] as JArray)) { res.Asks.Add(KunaOrder.FromJson(orderJson)); } foreach (JObject orderJson in (json["bids"] as JArray)) { res.Bids.Add(KunaOrder.FromJson(orderJson)); } return(res); }