Ejemplo n.º 1
0
        public Task <List <Instrument> > GetExchangeInstrumentsAsync(string exchangeCode)
        {
            if (_fundamentalDataAsyncClient == null)
            {
                _fundamentalDataAsyncClient = new FundamentalDataAsyncClient(_apiToken, _useProxy);
            }

            return(_fundamentalDataAsyncClient.GetExchangeInstrumentsAsync(exchangeCode));
        }
Ejemplo n.º 2
0
        public Task <IndexComposition> GetIndexCompositionAsync(string symbol)
        {
            if (_fundamentalDataAsyncClient == null)
            {
                _fundamentalDataAsyncClient = new FundamentalDataAsyncClient(_apiToken, _useProxy);
            }

            return(_fundamentalDataAsyncClient.GetIndexCompositionAsync(symbol));
        }
Ejemplo n.º 3
0
        public Task <FundamentalETF> GetFundamentalETFAsync(string symbol)
        {
            if (_fundamentalDataAsyncClient == null)
            {
                _fundamentalDataAsyncClient = new FundamentalDataAsyncClient(_apiToken, _useProxy);
            }

            return(_fundamentalDataAsyncClient.GetFundamentalETFAsync(symbol));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// To get an access to bulk fundamentals API,
        /// you should subscribe to ‘Extended Fundamentals’ package,
        /// more details we will provide by request: [email protected].
        ///
        /// It doesn’t work for entire US exchange,
        /// instead of it you should request each exchange separately,
        /// at the moment we do support:
        /// NASDAQ, NYSE (or ‘NYSE MKT’), BATS, and AMEX.
        /// All non-US exchanges supported as is.
        ///
        /// By default offset = 0 and limit = 1000
        /// </summary>
        /// <param name="exchange">The exchange code</param>
        /// <param name="offset">The number of records to skip</param>
        /// <param name="limit">If the ‘limit’ parameter is bigger than 1000, it will be reset to 1000.</param>
        /// <returns></returns>
        public async Task <IEnumerable <FundamentalStock> > GetBulkFundamentalStocksAsync(string exchange, int offset = 0, int limit = 1000)
        {
            if (_fundamentalDataAsyncClient == null)
            {
                _fundamentalDataAsyncClient = new FundamentalDataAsyncClient(_apiToken, _useProxy);
            }
            var results = await _fundamentalDataAsyncClient.GetBulkFundamentalsStocksAsync(exchange, offset, limit);

            return(results?.Values);
        }
Ejemplo n.º 5
0
        public async Task <IList <FundamentalStock> > GetFundamentalStockAsync(IList <string> symbols)
        {
            if (_fundamentalDataAsyncClient == null)
            {
                _fundamentalDataAsyncClient = new FundamentalDataAsyncClient(_apiToken, _useProxy);
            }

            var list = new List <FundamentalStock>();

            foreach (var symbol in symbols)
            {
                list.Add(await _fundamentalDataAsyncClient.GetFundamentalStockAsync(symbol));
            }

            return(list);
        }