Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public interface ICompanyValuationProvider
public Task<ApiResponse<List<KeyMetricsResponse>>> GetCompanyKeyMetricsAsync(string symbol, Period period = Period.Annual, int? limit = 130);

public Task<ApiResponse<DCFResponse>> GetDiscountedCashFlowAsync(string symbol);
public Task<ApiResponse<List<HistoricalDCFResponse>>> GetHistoricalDiscountedCashFlowAsync(string symbol, Period period = Period.Annual);
public Task<ApiResponse<List<HistoricalDailyDCFResponse>>> GetHistoricalDiscountedCashFlowDailyAsync(string symbol, int? limit = 100);

public Task<ApiResponse<MarketCapResponse>> GetMarketCapitalizationAsync(string symbol);
public Task<ApiResponse<List<MarketCapResponse>>> GetHistoricalMarketCapitalizationAsync(string symbol, int? limit = 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,46 +306,6 @@ public async Task<ApiResponse<DCFResponse>> GetDiscountedCashFlowAsync(string sy
return ApiResponse.FromSucces(result.Data.First());
}

public Task<ApiResponse<List<HistoricalDCFResponse>>> GetHistoricalDiscountedCashFlowAsync(string symbol, Period period = Period.Annual)
{
const string url = "[version]/historical-discounted-cash-flow-statement/[symbol]";

var pathParams = new NameValueCollection()
{
{ "version", ApiVersion.v3.ToString() },
{ "symbol", symbol }
};

var queryString = new QueryStringBuilder();

if (period != Period.Annual)
{
queryString.Add("period", period.ToString().ToLower());
}

return client.GetJsonAsync<List<HistoricalDCFResponse>>(url, pathParams, queryString);
}

public Task<ApiResponse<List<HistoricalDailyDCFResponse>>> GetHistoricalDiscountedCashFlowDailyAsync(string symbol, int? limit = 100)
{
const string url = "[version]/historical-discounted-cash-flow-statement/[symbol]";

var pathParams = new NameValueCollection()
{
{ "version", ApiVersion.v3.ToString() },
{ "symbol", symbol }
};

var queryString = new QueryStringBuilder();

if (limit != null)
{
queryString.Add("limit", limit);
}

return client.GetJsonAsync<List<HistoricalDailyDCFResponse>>(url, pathParams, queryString);
}

public async Task<ApiResponse<RatiosTTMResponse>> GetRatiosTTMAsync(string symbol)
{
const string url = "[version]/ratios-ttm/[symbol]";
Expand Down
20 changes: 0 additions & 20 deletions Tests/CompanyValuation/CompanyValuationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,6 @@ public async Task GetDiscountedCashFlowAsync()
Assert.Equal("AAPL", result.Data.Symbol);
}

[Fact]
public async Task GetHistoricalDiscountedCashFlowAsync()
{
var result = await api.GetHistoricalDiscountedCashFlowAsync("AAPL", Period.Quarter);

result.AssertNoErrors();
Assert.NotEmpty(result.Data);
Assert.All(result.Data, data => Assert.Equal("AAPL", data.Symbol));
}

[Fact]
public async Task GetHistoricalDiscountedCashFlowDailyAsync()
{
var result = await api.GetHistoricalDiscountedCashFlowDailyAsync("AAPL", 5);

result.AssertNoErrors();
Assert.NotEmpty(result.Data);
Assert.Equal(5, result.Data.Count);
Assert.All(result.Data, data => Assert.Equal("AAPL", data.Symbol));
}

[Theory]
[InlineData("AAPL")]
Expand Down
Loading