A simple Yahoo Finance API made in .NET Standard
All API calls return an IApiResponse<TData>
object.
using MatthiWare.YahooFinance.Core.Extensions;
services.AddYahooFinance();
using MatthiWare.YahooFinance;
var client = new YahooFinanceClient();
var client = new YahooFinanceClient();
// returns a list of search results, first item being the best matching.
var result = await client.Search.SearchAsync("Symbol or ISIN");
var client = new YahooFinanceClient();
// Returns a list of quote results
var result = await client.Quote.LookupAsync("Symbol or list of symbols");
using NodaTime;
var client = new YahooFinanceClient();
// returns a list of all dividends in a given period.
var result = await client.History.GetDividendsAsync("Symbol", clock.GetCurrentInstant().Minus(Duration.FromDays(365)), clock.GetCurrentInstant());
using NodaTime;
var client = new YahooFinanceClient();
// returns a list of all stock splits in a given period.
var result = await client.History.GetSplitsAsync("Symbol", clock.GetCurrentInstant().Minus(Duration.FromDays(365)), clock.GetCurrentInstant());
using NodaTime;
var client = new YahooFinanceClient();
// returns a list of all prices in a given period.
var result = await client.History.GetPricesAsync("Symbol", clock.GetCurrentInstant().Minus(Duration.FromDays(365)), clock.GetCurrentInstant());