public KlineArrayFileProvider(IOptionsMonitor <HistoricalDataPaths> hdp, IConfiguration configuration, HistoricalDataChunkRangeProvider rangeProvider) { HistoricalDataPaths = hdp.CurrentValue; HistoricalDataPaths.CreateIfMissing(); RangeProvider = rangeProvider; Console.WriteLine($"HistoricalDataPaths.BaseDir: {HistoricalDataPaths.BaseDir}"); }
public KlineArrayFile GetFile(string exchange, string exchangeArea, string symbol, TimeFrame timeFrame, DateTime date, KlineArrayFileOptions?options = null) { var(start, exclusiveEnd) = RangeProvider.RangeForDate(date, timeFrame); KlineArrayInfo info = new() { Exchange = exchange, ExchangeArea = exchangeArea, Symbol = symbol, TimeFrame = timeFrame.Name, Start = start, EndExclusive = exclusiveEnd, }; var file = new KlineArrayFile(HistoricalDataPaths.GetPath(exchange, exchangeArea, symbol, timeFrame, info, options), info); return(file); }