Exemplo n.º 1
0
        public Task <SupportResistance> GetSupportResistance(string symbol, Resolution resolution)
        {
            if (string.IsNullOrWhiteSpace(symbol))
            {
                throw new ArgumentException(nameof(symbol));
            }

            return(_finnhubClient.SendAsync <SupportResistance>("/scan/support-resistance", JsonDeserialiser.Default,
                                                                new Field(FieldKeys.Symbol, symbol),
                                                                new Field(FieldKeys.Resolution, resolution.GetFieldValue())));
        }
        public Task <Company> GetCompany(string symbol)
        {
            if (string.IsNullOrWhiteSpace(symbol))
            {
                throw new ArgumentException(nameof(symbol));
            }

            return(_finnhubClient.SendAsync <Company>("stock/profile", JsonDeserialiser.Default,
                                                      new Field(FieldKeys.Symbol, symbol)));
        }
 public Task <string[]> GetExchanges()
 {
     return(_finnhubClient.SendAsync <string[]>("forex/exchange", JsonDeserialiser.Default));
 }
 public Task <NewsEntry[]> GetNews(NewsCategory category)
 {
     return(_finnhubClient.SendAsync <NewsEntry[]>("news", JsonDeserialiser.Default,
                                                   new Field(FieldKeys.Category, category.GetFieldValue())));
 }