Пример #1
0
        public AlphaVantageForex([NotNull] Configuration config, IHttpClient http)
        {
            _config = config.AlphaAdvantage;
            _http   = http;

            _cache        = new FluidCache <IForexQuote>(_config.CacheSize, TimeSpan.FromSeconds(_config.CacheMinAgeSeconds), TimeSpan.FromSeconds(_config.CacheMaxAgeSeconds), () => DateTime.UtcNow);
            _bySymbolPair = _cache.AddIndex("BySymbolPair", a => new KeyValuePair <string, string>(a.FromCode, a.ToCode));
        }
Пример #2
0
        public AlphaVantageStocks([NotNull] Configuration config, IHttpClient http)
        {
            _config = config.AlphaAdvantage;
            _http   = http;

            _cache    = new FluidCache <IStockQuote>(_config.CacheSize, TimeSpan.FromSeconds(_config.CacheMinAgeSeconds), TimeSpan.FromSeconds(_config.CacheMaxAgeSeconds), () => DateTime.UtcNow);
            _bySymbol = _cache.AddIndex("BySymbol", a => a.Symbol);
        }
Пример #3
0
 public AlphaAdvantageService([NotNull] Configuration config, [NotNull] IHttpClient http)
 {
     _config = config.AlphaAdvantage;
     _http   = http;
 }
Пример #4
0
 public AlphaVantageStockSearch([NotNull] Configuration config, IHttpClient http)
 {
     _config = config.AlphaAdvantage;
     _http   = http;
 }
Пример #5
0
 public AlphaAdvantageService(AlphaAdvantageConfig config)
 {
     //https://www.alphavantage.co/documentation/#fx
 }