public ThresholdCheck GetThresholdCheck(ExchangeSyncSetting setting) { return(new ThresholdCheck( nameof(SymbolDetailsChangeset), _changedSymbols.Count, setting.UpdateThresholdPercent)); }
public ThresholdCheck GetThresholdCheck(ExchangeSyncSetting setting) { return(new ThresholdCheck( nameof(NewSymbolChangeset), _newSymbols.Count, setting.InsertThresholdPercent)); }
public ThresholdCheck GetThresholdCheck(ExchangeSyncSetting setting) { return(new ThresholdCheck( nameof(SymbolDelistChangeset), _delistedSymbolIds.Count, setting.DeleteThresholdPercent)); }
/// <summary> /// Get all the listed traded symbols for for all major stock exchanges from nasdaq ftp /// </summary> /// <param name="syncSettings">The <see cref="ExchangeSyncSetting"/> containing sync settings.</ExchangeSyncSetting> </param> /// <returns>IReadOnlyDictionary with <see cref="SymbolKey"/> as key and <see cref="DownloadedSymbol"/> for the value.</returns> public async Task <IReadOnlyDictionary <SymbolKey, DownloadedSymbol> > GetTradedSymbols(ExchangeSyncSetting syncSettings) { _logger.LogTrace("Executing query http request url: {url}", syncSettings.Url); // no login necessary using var stream = _ftpClient.DownloadFile(syncSettings.Url, string.Empty, string.Empty); using StreamReader reader = new StreamReader(stream); var tickerToSymbols = await _parser.GetSymbolMap(reader, syncSettings.Delimiter, syncSettings.SuffixBlackList); return(new ReadOnlyDictionary <SymbolKey, DownloadedSymbol>(tickerToSymbols)); }