Exemple #1
0
        public Task <List <Exchange> > GetExchangeListAsync()
        {
            if (_exchangesDataAsyncClient == null)
            {
                _exchangesDataAsyncClient = new ExchangesDataAsyncClient(_apiToken, _useProxy);
            }

            return(_exchangesDataAsyncClient.GetExchangesAsync());
        }
Exemple #2
0
        /// <summary>
        /// Retrieve bulk EOD dividends for a specified exchange.
        /// Can optionally be limited to a set of symbols and/or a trading day.
        /// </summary>
        /// <param name="exchange">The exchange that its bulk EOD dividends shall be obtained</param>
        /// <param name="date">Optional. Day that EOD dividends shall be obtained from. Will default to last trading day</param>
        /// <param name="symbols">Optional. List of symbols to query. Will default to all symbols of the specified exchange</param>
        /// <returns>List of bulk EOD dividends from specified exchange</returns>
        /// <exception cref="ArgumentException">Thrown when exchange parameter is null or empty</exception>
        public Task <List <ExchangeBulkDividend> > GetExchangeBulkDividendsAsync(string exchange, DateTime?date, params string[] symbols)
        {
            if (string.IsNullOrEmpty(exchange))
            {
                throw new ArgumentException("Exchange is null or empty, cannot query exchange bulk dividend data.");
            }

            if (_exchangesDataAsyncClient == null)
            {
                _exchangesDataAsyncClient = new ExchangesDataAsyncClient(_apiToken, _useProxy);
            }

            return(_exchangesDataAsyncClient.GetExchangeBulkDividendsAsync(exchange, date, symbols));
        }
Exemple #3
0
        public Task <ExchangeDetails> GetExchangeDetailsAsync(string exchange, DateTime?startDate, DateTime?endDate)
        {
            if (string.IsNullOrEmpty(exchange))
            {
                throw new ArgumentException("Exchange is null or empty, cannot query exchange details.");
            }

            if (_exchangesDataAsyncClient == null)
            {
                _exchangesDataAsyncClient = new ExchangesDataAsyncClient(_apiToken, _useProxy);
            }

            return(_exchangesDataAsyncClient.GetExchangeDetailsAsync(exchange, startDate, endDate));
        }