public void APIDataUpdate(string urldata) { totalBalance = 0; totalPending = 0; foreach (PriceEntryBase entry in PriceEntries) { string urd = urldata; if (!string.IsNullOrWhiteSpace(entry.ApiKey) && !string.IsNullOrWhiteSpace(entry.Tag) && !string.IsNullOrWhiteSpace(entry.CoinName)) { urd = urd.Replace("TAG", entry.Tag); urd = urd.Replace("APIKEY", entry.ApiKey); urd = urd.Replace("COINNAME", entry.CoinName); if (ServiceName == "TheBlockFactory" && entry.Tag.ToLower() == "dgb") { urd = urd.Replace(entry.Tag, entry.CoinName); } if (!string.IsNullOrWhiteSpace(urd)) { WebUtil4.DownloadJson(entry.CoinName, urd, APIProcessData); } } } }
public override void CheckData() { foreach (NanopoolPriceEntry entry in PriceEntries) { if (!string.IsNullOrWhiteSpace(entry.Wallet) && !string.IsNullOrWhiteSpace(entry.Tag) && !string.IsNullOrWhiteSpace(entry.CoinName)) { if (entry.Tag.ToLower() == "pasc") { entry.Wallet = entry.Wallet.Remove("-64"); } WebUtil4.DownloadJson(entry.CoinName, "https://api.nanopool.org/v1/" + entry.Tag + "/prices", ProcessExRate); WebUtil4.DownloadJson(entry.CoinName, "https://api.nanopool.org/v1/" + entry.Tag + "/user/" + entry.Wallet, Process); } } }
public override void CheckPrices() { if (PriceWTM == true) { WTMUpdate(); } else { foreach (NanopoolPriceEntry entry in PriceEntries) { if (!string.IsNullOrWhiteSpace(entry.Tag) && !string.IsNullOrWhiteSpace(entry.CoinName)) { WebUtil4.DownloadJson(entry.CoinName, "https://api.nanopool.org/v1/" + entry.Tag + "/approximated_earnings/1", ProcessPrices); } } } }