forked from MatthiWare/FinancialModelingPrep.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Updated packages -Added .NET 7 target -Dropped .NET 5 target -Added console app project for testing
- Loading branch information
Showing
8 changed files
with
143 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MatthiWare.FinancialModelingPrep; | ||
|
||
public class Rootobject | ||
{ | ||
public Class1[] Property1 { get; set; } | ||
} | ||
|
||
public class Class1 | ||
{ | ||
public string date { get; set; } | ||
public string symbol { get; set; } | ||
public string reportedCurrency { get; set; } | ||
public string cik { get; set; } | ||
public string fillingDate { get; set; } | ||
public string acceptedDate { get; set; } | ||
public string calendarYear { get; set; } | ||
public string period { get; set; } | ||
public long revenue { get; set; } | ||
public long costOfRevenue { get; set; } | ||
public long grossProfit { get; set; } | ||
public float grossProfitRatio { get; set; } | ||
public long researchAndDevelopmentExpenses { get; set; } | ||
public float generalAndAdministrativeExpenses { get; set; } | ||
public float sellingAndMarketingExpenses { get; set; } | ||
public long sellingGeneralAndAdministrativeExpenses { get; set; } | ||
public float otherExpenses { get; set; } | ||
public long operatingExpenses { get; set; } | ||
public long costAndExpenses { get; set; } | ||
public long interestIncome { get; set; } | ||
public long interestExpense { get; set; } | ||
public long depreciationAndAmortization { get; set; } | ||
public long ebitda { get; set; } | ||
public float ebitdaratio { get; set; } | ||
public long operatingIncome { get; set; } | ||
public float operatingIncomeRatio { get; set; } | ||
public long totalOtherIncomeExpensesNet { get; set; } | ||
public long incomeBeforeTax { get; set; } | ||
public float incomeBeforeTaxRatio { get; set; } | ||
public long incomeTaxExpense { get; set; } | ||
public long netIncome { get; set; } | ||
public float netIncomeRatio { get; set; } | ||
public float eps { get; set; } | ||
public float epsdiluted { get; set; } | ||
public long weightedAverageShsOut { get; set; } | ||
public long weightedAverageShsOutDil { get; set; } | ||
public string link { get; set; } | ||
public string finalLink { get; set; } | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
FinancialModelingPrepApi/DataAccess/CompanyValuation/IIncomeStatementData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using MatthiWare.FinancialModelingPrep.Model; | ||
using MatthiWare.FinancialModelingPrep.Model.CompanyValuation; | ||
using Refit; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
|
||
namespace MatthiWare.FinancialModelingPrep.DataAccess.CompanyValuation | ||
{ | ||
public interface IIncomeStatementData | ||
{ | ||
[Get(path: "/income-statement/{symbol}")] | ||
Task<IncomeStatementResponse> GetIncomeStatement(string symbol); | ||
|
||
[Get(path: "/income-statement/{symbol}")] | ||
Task<Model.ApiResponse<List<IncomeStatementResponse>>> GetIncomeStatementAsync(string symbol, Period period = Period.Quarter, int? limit = 40); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// See https://aka.ms/new-console-template for more information | ||
using System; | ||
using MatthiWare.FinancialModelingPrep; | ||
|
||
|
||
Console.WriteLine("Hello, World!"); | ||
|
||
//Services.AddFinancialModelingPrepApiClient(new FinancialModelingPrepOptions() | ||
//{ | ||
// ApiKey = "API-KEY-HERE" | ||
//}); | ||
|
||
//var api = ServiceProvider.GetRequiredService<IFinancialModelingPrepApiClient>(); | ||
|
||
//// do something with api like getting the latest Apple Stock Quote | ||
//var quoteResult = await api.CompanyValuation.GetQuoteAsync("AAPL"); | ||
|
||
|
||
FinancialModelingPrepOptions financialModelingPrepOptions = new FinancialModelingPrepOptions() | ||
{ | ||
ApiKey = "7a711b4efd6f42664961b587f8944130" | ||
}; | ||
|
||
var api = FinancialModelingPrepApiClientFactory.CreateClient(financialModelingPrepOptions); | ||
|
||
// do something with api like getting the latest Apple Stock Quote | ||
var quoteResult = await api.CompanyValuation.GetQuoteAsync("TSLA"); | ||
|
||
Console.WriteLine(quoteResult.Data); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\FinancialModelingPrepApi\FinancialModelingPrepApi.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters