public static string GetMarketLink(string platform, string exchange, string market, string mainMarket) { string result = "#"; if (platform.Equals("TradingView")) { result = "https://www.tradingview.com/chart/?symbol=" + exchange.ToUpper() + ":"; string pairName = SystemHelper.StripBadCode(market, Constants.WhiteListMinimal); if (pairName.StartsWith(mainMarket)) { pairName = pairName.Replace(mainMarket, "") + mainMarket; } result += pairName; } else { switch (exchange) { case "Bittrex": result = "https://bittrex.com/Market/Index?MarketName=" + market; break; case "Binance": result = "https://www.binance.com/trade.html?symbol=" + market; break; case "Poloniex": result = "https://poloniex.com/exchange#" + market.ToLower(); break; } } return(result); }
public static bool IsRecentVersion(string currentVersion, string latestVersion) { bool result = true; List <int> currentVersionInfo = SystemHelper.ConvertTokenStringToListInt(currentVersion, "."); List <int> latestVersionInfo = SystemHelper.ConvertTokenStringToListInt(latestVersion, "."); if (currentVersionInfo[0] < latestVersionInfo[0]) { result = false; } if (currentVersionInfo[0] == latestVersionInfo[0] && currentVersionInfo[1] < latestVersionInfo[1]) { result = false; } if (currentVersionInfo[0] == latestVersionInfo[0] && currentVersionInfo[1] == latestVersionInfo[1] && currentVersionInfo[2] < latestVersionInfo[2]) { result = false; } return(result); }
public static string GetTradingViewSymbol(string exchange, string market, string mainMarket) { string result = exchange.ToUpper() + ":"; string pairName = SystemHelper.StripBadCode(market, Constants.WhiteListMinimal); if (pairName.StartsWith(mainMarket)) { pairName = pairName.Replace(mainMarket, "") + mainMarket; } if (exchange.Equals("binancefutures", StringComparison.InvariantCultureIgnoreCase)) { result = "BINANCE:" + pairName + "PERP"; } else { result += pairName; } return(result); }