示例#1
0
        public static List <Market> ParseMarkets(JObject marketsJson)
        {
            List <Market> markets = new List <Market>();

            foreach (JProperty baseProperty in marketsJson.Properties())
            {
                string  baseCurrency    = baseProperty.Name;
                JObject quoteCurrencies = baseProperty.Value as JObject;

                if (null != quoteCurrencies)
                {
                    foreach (JProperty quoteProperty in quoteCurrencies.Properties())
                    {
                        markets.Add(VircurexMarket.Parse(baseCurrency, quoteProperty));
                    }
                }
            }

            return(markets);
        }
示例#2
0
        public async Task <List <Market> > GetMarkets()
        {
            JObject marketsJson = await CallPublic <JObject>(Method.get_info_for_currency);

            return(VircurexMarket.ParseMarkets(marketsJson));
        }