Skip to content

Commit e57fe00

Browse files
authored
Remove historical discounted cashflows endpoints (#135)
1 parent 3c4e185 commit e57fe00

File tree

3 files changed

+0
-62
lines changed

3 files changed

+0
-62
lines changed

FinancialModelingPrepApi/Abstractions/CompanyValuation/ICompanyValuationProvider.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ public interface ICompanyValuationProvider
2727
public Task<ApiResponse<List<KeyMetricsResponse>>> GetCompanyKeyMetricsAsync(string symbol, Period period = Period.Annual, int? limit = 130);
2828

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

3331
public Task<ApiResponse<MarketCapResponse>> GetMarketCapitalizationAsync(string symbol);
3432
public Task<ApiResponse<List<MarketCapResponse>>> GetHistoricalMarketCapitalizationAsync(string symbol, int? limit = 100);

FinancialModelingPrepApi/Core/CompanyValuation/CompanyValuationProvider.cs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -306,46 +306,6 @@ public async Task<ApiResponse<DCFResponse>> GetDiscountedCashFlowAsync(string sy
306306
return ApiResponse.FromSucces(result.Data.First());
307307
}
308308

309-
public Task<ApiResponse<List<HistoricalDCFResponse>>> GetHistoricalDiscountedCashFlowAsync(string symbol, Period period = Period.Annual)
310-
{
311-
const string url = "[version]/historical-discounted-cash-flow-statement/[symbol]";
312-
313-
var pathParams = new NameValueCollection()
314-
{
315-
{ "version", ApiVersion.v3.ToString() },
316-
{ "symbol", symbol }
317-
};
318-
319-
var queryString = new QueryStringBuilder();
320-
321-
if (period != Period.Annual)
322-
{
323-
queryString.Add("period", period.ToString().ToLower());
324-
}
325-
326-
return client.GetJsonAsync<List<HistoricalDCFResponse>>(url, pathParams, queryString);
327-
}
328-
329-
public Task<ApiResponse<List<HistoricalDailyDCFResponse>>> GetHistoricalDiscountedCashFlowDailyAsync(string symbol, int? limit = 100)
330-
{
331-
const string url = "[version]/historical-discounted-cash-flow-statement/[symbol]";
332-
333-
var pathParams = new NameValueCollection()
334-
{
335-
{ "version", ApiVersion.v3.ToString() },
336-
{ "symbol", symbol }
337-
};
338-
339-
var queryString = new QueryStringBuilder();
340-
341-
if (limit != null)
342-
{
343-
queryString.Add("limit", limit);
344-
}
345-
346-
return client.GetJsonAsync<List<HistoricalDailyDCFResponse>>(url, pathParams, queryString);
347-
}
348-
349309
public async Task<ApiResponse<RatiosTTMResponse>> GetRatiosTTMAsync(string symbol)
350310
{
351311
const string url = "[version]/ratios-ttm/[symbol]";

Tests/CompanyValuation/CompanyValuationTests.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -340,26 +340,6 @@ public async Task GetDiscountedCashFlowAsync()
340340
Assert.Equal("AAPL", result.Data.Symbol);
341341
}
342342

343-
[Fact]
344-
public async Task GetHistoricalDiscountedCashFlowAsync()
345-
{
346-
var result = await api.GetHistoricalDiscountedCashFlowAsync("AAPL", Period.Quarter);
347-
348-
result.AssertNoErrors();
349-
Assert.NotEmpty(result.Data);
350-
Assert.All(result.Data, data => Assert.Equal("AAPL", data.Symbol));
351-
}
352-
353-
[Fact]
354-
public async Task GetHistoricalDiscountedCashFlowDailyAsync()
355-
{
356-
var result = await api.GetHistoricalDiscountedCashFlowDailyAsync("AAPL", 5);
357-
358-
result.AssertNoErrors();
359-
Assert.NotEmpty(result.Data);
360-
Assert.Equal(5, result.Data.Count);
361-
Assert.All(result.Data, data => Assert.Equal("AAPL", data.Symbol));
362-
}
363343

364344
[Theory]
365345
[InlineData("AAPL")]

0 commit comments

Comments
 (0)