MatthiWare.YahooFinance
0.1.1
A simple Yahoo Finance API made in .NET Standard
Install-Package MatthiWare.YahooFinance -Version 0.1.1
dotnet add package MatthiWare.YahooFinance --version 0.1.1
<PackageReference Include="MatthiWare.YahooFinance" Version="0.1.1" />
paket add MatthiWare.YahooFinance --version 0.1.1
<p align="center">
<a href="https://ci.appveyor.com/project/Matthiee/yahoofinance-core"><img src="https://ci.appveyor.com/api/projects/status/8a3r5c9rxot4ixed?svg=true" alt="Build Status (AppVeyor)"></a>
<a href="https://github.com/MatthiWare/YahooFinance.Core/issues"><img src="https://img.shields.io/github/issues/MatthiWare/YahooFinance.Core.svg" alt="Open Issues"></a>
<a href="https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)"><img src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" alt="AGPL v3"></a>
<a href="https://www.nuget.org/packages/MatthiWare.YahooFinance"><img src="https://buildstats.info/nuget/MatthiWare.YahooFinance" alt="NuGet badge"></a>
</p>
YahooFinance.Core
A simple Yahoo Finance API made in .NET Standard
Usage
API
All API calls return an IApiResponse<TData>
object.
Using DI
using MatthiWare.YahooFinance.Core.Extensions;
services.AddYahooFinance();
Using constructor
using MatthiWare.YahooFinance;
var client = new YahooFinanceClient();
Searching for Symbol or ISIN
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");
Get Quote
var client = new YahooFinanceClient();
// Returns a list of quote results
var result = await client.Quote.LookupAsync("Symbol or list of symbols");
Get Dividend History
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());
Get Stock Splits
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());
Get Prices History
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());
<p align="center">
<a href="https://ci.appveyor.com/project/Matthiee/yahoofinance-core"><img src="https://ci.appveyor.com/api/projects/status/8a3r5c9rxot4ixed?svg=true" alt="Build Status (AppVeyor)"></a>
<a href="https://github.com/MatthiWare/YahooFinance.Core/issues"><img src="https://img.shields.io/github/issues/MatthiWare/YahooFinance.Core.svg" alt="Open Issues"></a>
<a href="https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)"><img src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" alt="AGPL v3"></a>
<a href="https://www.nuget.org/packages/MatthiWare.YahooFinance"><img src="https://buildstats.info/nuget/MatthiWare.YahooFinance" alt="NuGet badge"></a>
</p>
YahooFinance.Core
A simple Yahoo Finance API made in .NET Standard
Usage
API
All API calls return an IApiResponse<TData>
object.
Using DI
using MatthiWare.YahooFinance.Core.Extensions;
services.AddYahooFinance();
Using constructor
using MatthiWare.YahooFinance;
var client = new YahooFinanceClient();
Searching for Symbol or ISIN
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");
Get Quote
var client = new YahooFinanceClient();
// Returns a list of quote results
var result = await client.Quote.LookupAsync("Symbol or list of symbols");
Get Dividend History
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());
Get Stock Splits
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());
Get Prices History
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());
Release Notes
Handle null values in response correctly
Dependencies
-
.NETStandard 2.0
- AutoMapper (>= 9.0.0)
- CsvHelper (>= 15.0.2)
- Microsoft.AspNet.WebApi.Client (>= 5.2.7)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.1.3)
- Microsoft.Extensions.Http (>= 3.1.2)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.3)
- Newtonsoft.Json (>= 12.0.3)
- NodaTime (>= 2.4.7)
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.