MatthiWare.YahooFinance 0.1.1

.NET Standard 2.0
dotnet add package MatthiWare.YahooFinance --version 0.1.1
NuGet\Install-Package MatthiWare.YahooFinance -Version 0.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MatthiWare.YahooFinance" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MatthiWare.YahooFinance --version 0.1.1
#r "nuget: MatthiWare.YahooFinance, 0.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MatthiWare.YahooFinance as a Cake Addin
#addin nuget:?package=MatthiWare.YahooFinance&version=0.1.1

// Install MatthiWare.YahooFinance as a Cake Tool
#tool nuget:?package=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());
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.1 575 10/2/2020
0.1.0 429 3/31/2020

Handle null values in response correctly