
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
This is a library to help .NET developers to collect financial market information from Yahoo Finance (unofficial api). The current version 2.0.0 has been modified and improved:
--
--
To use the library you must add it to your project via nuget click here. If you want to collect data from the last trading day of an asset, you can do it according to the example below:
using YahooFinance.NET;
class Program
{
static void Main(string[] args)
{
string symbol = "AAPL";
var yf = new YahooFinance();
var quotes = yf.Quotes.GetQuotationDaily(symbol);
foreach(var quote in quotes)
{
Console.WriteLine($"--> Data:{quote.Date}");
Console.WriteLine($"Open:{quote.Open}");
Console.WriteLine($"High:{quote.High}");
Console.WriteLine($"Low:{quote.Low}");
Console.WriteLine($"Close:{quote.Close}");
Console.WriteLine($"Volume:{quote.Volume}","\n");
}
}
}
For other predefined periods you can follow the same concept. If you wanted a more personalized period, you could do:
using YahooFinance.NET;
class Program
{
static void Main(string[] args)
{
string symbol = "AAPL";
DataTime start = Convert.ToDecimal("02/03/2016").Date;
DataTime end = Convert.ToDecimal("28/07/2017").Date;
var yf = new YahooFinance();
var quotes = yf.Quotes.GetQuotationCustom(symbol, start, end);
}
// Return: List quote data
}
This will return a list of data. You will need to implement a class to map the information and use it as your project needs. You can specify a frequency for returning the data set. By default, data is returned on a daily basis. You can change this output by entering the Weekly or Monthly options.
using YahooFinance.NET;
class Program
{
static void Main(string[] args)
{
string symbol = "AAPL";
DataTime start = Convert.ToDecimal("02/03/2016").Date;
DataTime end = Convert.ToDecimal("28/07/2017").Date;
var yf = new YahooFinance();
var quotes = yf.Quotes.GetQuotationCustom(symbol, start, end, DataFrequency.Monthly);
}
// Return: List quote data
}
If you have any questions, suggestions or criticisms, please contact us at uitan.s.maciel@gmail.com or open an issue on github.
FAQs
Unknown package
We found that yahoofinancefor.net demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.