Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge branch 'documentation' of https://github.com/cosmincatalin/fina…
Browse files Browse the repository at this point in the history
…nce-library into documentation
  • Loading branch information
cosmincatalin committed Sep 28, 2022
2 parents 793c0d4 + 2dada61 commit 01fc273
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
26 changes: 17 additions & 9 deletions Finance/EarningsCalendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ public static class EarningsCalendar
/// <example>
/// In this example we get a list of companies that report on 2022-09-28
/// <code language="c#">
/// using CosminSanda.Finance;
/// using CosminSanda.Finance;
///
/// var companies = await EarningsCalendar.GetCompaniesReporting(new DateTime(year: 2022, month: 9, day: 28));
/// companies.ForEach(Console.WriteLine);
/// var companies = await EarningsCalendar
/// .GetCompaniesReporting(new DateTime(year: 2022, month: 9, day: 28));
/// companies.ForEach(Console.WriteLine);
/// </code>
/// </example>
/// <param name="day">The day for which you want to know the companies reporting earnings</param>
Expand All @@ -39,10 +40,10 @@ public static async Task<List<FinancialInstrument>> GetCompaniesReporting(DateTi
/// <example>
/// In this example we get past earnings calls dates for the Microsoft Corporation.
/// <code language="c#">
/// using CosminSanda.Finance;
/// using CosminSanda.Finance;
///
/// var companies = await EarningsCalendar.GetPastEarningsDates("msft");
/// companies.ForEach(Console.WriteLine);
/// var earnings = await EarningsCalendar.GetPastEarningsDates("msft");
/// earnings.ForEach(Console.WriteLine);
/// </code>
/// </example>
/// <param name="ticker">The financial instrument's ticker as used on Yahoo Finance. The case is not important.</param>
Expand All @@ -63,8 +64,16 @@ public static async Task<List<EarningsDate>> GetPastEarningsDates(string ticker)
/// <summary>
/// A method to get the next estimated(or set) earnings release call.
/// </summary>
/// <param name="ticker"></param>
/// <returns></returns>
/// <example>
/// <code language="c#">
/// using CosminSanda.Finance;
///
/// var earning = await EarningsCalendar.GetNextEarningsDate("msft");
/// Console.WriteLine(earning);
/// </code>
/// </example>
/// <param name="ticker">The financial instrument's ticker as used on Yahoo Finance. The case is not important.</param>
/// <returns>An earnings date in the future</returns>
public static async Task<EarningsDate> GetNextEarningsDate(string ticker)
{
var financialInstrument = new FinancialInstrument { Ticker = ticker };
Expand All @@ -76,7 +85,6 @@ public static async Task<EarningsDate> GetNextEarningsDate(string ticker)
.Select(o => o.EarningsDate)
.OrderBy(o => o.Date)
.Take(1)
.ToList()
.First();
}
}
4 changes: 2 additions & 2 deletions Finance/Quotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
namespace CosminSanda.Finance;

/// <summary>
/// Contains methods for retrieving quotes (prices) on selected days for selected companies.
/// Contains methods for retrieving daily quotes (prices) for selected companies.
/// </summary>
public static class Quotes
{
/// <summary>
/// Retrieve the day Candles for an instrument during a time interval.
/// Retrieve the Japanese candles for each day of a time interval for a specified company.
/// </summary>
/// <param name="ticker">The financial instrument's ticker as used on Yahoo Finance.</param>
/// <param name="startDate">The day from when you start retrieving the quotes, inclusive.</param>
Expand Down
4 changes: 2 additions & 2 deletions docfx_project/toc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Articles
href: articles/
#- name: Articles
# href: articles/
- name: Api Documentation
href: api/
homepage: api/index.md

0 comments on commit 01fc273

Please sign in to comment.