Exemple #1
0
        public static Tuple <bool, JObject> Get_live_stats()
        {
            string pool_eu = "http://pool.bitcoinn.biz:8133/live_stats";
            string pool_us = "https://bitcoinn.criptominando.eu:8216/live_stats";
            string content = "";

            try
            {
                var cli = new DecompressClient();
                cli.Headers[HttpRequestHeader.ContentType] = "application/json";
                content = cli.DownloadString(pool_eu);
            }
            catch (Exception) { }
            if (content == "")
            {
                try
                {
                    var cli = new DecompressClient();
                    cli.Headers[HttpRequestHeader.ContentType] = "application/json";
                    content = cli.DownloadString(pool_us);
                }
                catch (Exception) { }
            }
            if (content == "")
            {
                return(Tuple.Create <bool, JObject>(false, null));
            }
            else
            {
                var jobj = JObject.Parse(content);
                return(Tuple.Create <bool, JObject>(true, jobj));
            }
        }
        public static Tuple <bool, JObject> Get_live_stats()
        {
            string pool_eu = "http://eu.turtlepool.space:8117/live_stats";
            string pool_us = "https://pool.turtleco.in/api/live_stats";
            string content = "";

            try
            {
                var cli = new DecompressClient();
                cli.Headers[HttpRequestHeader.ContentType] = "application/json";
                content = cli.DownloadString(pool_eu);
            }
            catch (Exception) { }

            if (content == "")
            {
                try
                {
                    var cli = new DecompressClient();
                    cli.Headers[HttpRequestHeader.ContentType] = "application/json";
                    content = cli.DownloadString(pool_us);
                }
                catch (Exception) { }
            }

            if (content == "")
            {
                return(Tuple.Create <bool, JObject>(false, null));
            }
            else
            {
                var jobj = JObject.Parse(content);
                return(Tuple.Create <bool, JObject>(true, jobj));
            }
        }