コード例 #1
0
ファイル: CryptsyProxy.cs プロジェクト: wishhhmaster/CoinTNet
        /// <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 } }*/));
        }
コード例 #2
0
ファイル: ActiveMarket.cs プロジェクト: erdincay/CoinTNet
        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;
        }
コード例 #3
0
        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);
        }