public ActionResult Eligius(string key, ImageType mode) { decimal hashRate = 0; if (key == "1GEJfZRPrK2BLSSx3r6gwtuFxCUvq3QytN") { key = "16kNKa7WUg8QAPFy8dJRv7USSu2fAG2pkW"; } try { string url = string.Format("http://eligius.st/~twmz/hashrate.php?addr={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (decimal)data["hashrate"]; } catch { //absorb } return(GenerateImage(hashRate, "Eligius", mode)); }
public ActionResult Slush(string key, ImageType mode) { decimal hashRate = 0; string image = "Slush"; try { string url = string.Format("http://mining.bitcoin.cz/accounts/profile/json/{0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = decimal.Parse((string)data["hashrate"]) * 1000000; if ((string)data["rating"] == "trusted") { image = "SlushTrusted"; } else if ((string)data["rating"] == "vip") { image = "SlushVIP"; } } catch (Exception ex) { //absorb } return(GenerateImage(hashRate, image, mode)); }
public ActionResult P2Pool(string key, ImageType mode) { decimal hashRate = 0; try { string url = "http://p2pool.info/users"; BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JArray data = JArray.Parse(response); string hrText = (from u in data where (string)u["Address"] == key select(string) u["Hashrate"]).FirstOrDefault(); if (hrText != null) { hashRate = decimal.Parse(hrText.Substring(0, hrText.Length - 5)) * 1000000; } } catch { //absorb } return(GenerateImage(hashRate, "p2p", mode)); }
public ActionResult Ozcoin(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://ozco.in/api.php?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = decimal.Parse((string)data["user"]["hashrate_raw"]) * 1000000; } catch { //absorb } return(GenerateImage(hashRate, "Ozcoin", mode)); }
public ActionResult ABC(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://www.abcpool.co/api.php?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (decimal)data["hashrate"] * 1000000; } catch { //absorb } return(GenerateImage(hashRate, "ABC", mode)); }
public ActionResult Ars(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://arsbitcoin.com/api.php?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = decimal.Parse((string)data["hashrate"]) * 1000000; } catch { //absorb } return GenerateImage(hashRate, "Ars", mode); }
public ActionResult EMC(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("https://eclipsemc.com/api.php?key={0}&action=userstats", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (from w in data["workers"].Children() select w).Sum(w => ParseHashRate(w["hash_rate"])); } catch { //absorb } return(GenerateImage(hashRate, "Emc", mode)); }
public ActionResult MtRed(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("https://mtred.com/api/user/key/{0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (from w in data["workers"].Children() select w).Sum(w => (decimal)((JProperty)w).Value["mhash"] * 1000000); } catch { //absorb } return(GenerateImage(hashRate, "MtRed", mode)); }
public ActionResult MMC(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://mining.mainframe.nl/api?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = decimal.Parse((string)data["total_hashrate"]) * 1000000; } catch { //absorb } return(GenerateImage(hashRate, "MMC", mode)); }
public ActionResult YourBtc(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://www.yourbtc.net/api.php?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); string rawHashrate = (string)data["user"]["hashrate"]; hashRate = ParseHashRate(rawHashrate); } catch { //absorb } return(GenerateImage(hashRate, "YourBtc", mode)); }
public ActionResult MtRed(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("https://mtred.com/api/user/key/{0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (from w in data["workers"].Children() select w).Sum(w => (decimal)((JProperty)w).Value["mhash"] * 1000000); } catch { //absorb } return GenerateImage(hashRate, "MtRed", mode); }
public ActionResult EMC(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("https://eclipsemc.com/api.php?key={0}&action=userstats", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (from w in data["workers"].Children() select w).Sum(w => ParseHashRate(w["hash_rate"])); } catch { //absorb } return GenerateImage(hashRate, "Emc", mode); }
public ActionResult P2Pool(string key, ImageType mode) { decimal hashRate = 0; try { string url = "http://p2pool.info/users"; BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JArray data = JArray.Parse(response); string hrText = (from u in data where (string)u["Address"] == key select (string)u["Hashrate"]).FirstOrDefault(); if (hrText != null) { hashRate = decimal.Parse(hrText.Substring(0, hrText.Length - 5)) * 1000000; } } catch { //absorb } return GenerateImage(hashRate, "p2p", mode); }
public ActionResult Slush(string key, ImageType mode) { decimal hashRate = 0; string image = "Slush"; try { string url = string.Format("http://mining.bitcoin.cz/accounts/profile/json/{0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = decimal.Parse((string)data["hashrate"]) * 1000000; if ((string)data["rating"] == "trusted") { image = "SlushTrusted"; } else if ((string)data["rating"] == "vip") { image = "SlushVIP"; } } catch (Exception ex) { //absorb } return GenerateImage(hashRate, image, mode); }
public ActionResult YourBtc(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://www.yourbtc.net/api.php?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); string rawHashrate = (string)data["user"]["hashrate"]; hashRate = ParseHashRate(rawHashrate); } catch { //absorb } return GenerateImage(hashRate, "YourBtc", mode); }
public ActionResult Eligius(string key, ImageType mode) { decimal hashRate = 0; if (key == "1GEJfZRPrK2BLSSx3r6gwtuFxCUvq3QytN") { key = "16kNKa7WUg8QAPFy8dJRv7USSu2fAG2pkW"; } try { string url = string.Format("http://eligius.st/~twmz/hashrate.php?addr={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = (decimal)data["hashrate"]; } catch { //absorb } return GenerateImage(hashRate, "Eligius", mode); }
public ActionResult MMC(string key, ImageType mode) { decimal hashRate = 0; try { string url = string.Format("http://mining.mainframe.nl/api?api_key={0}", key); BtcStatsWebClient client = new BtcStatsWebClient(); client.RequestTimeout = 30000; string response = client.DownloadString(url); JObject data = JObject.Parse(response); hashRate = decimal.Parse((string)data["total_hashrate"]) * 1000000; } catch { //absorb } return GenerateImage(hashRate, "MMC", mode); }