fundamentalsTimeseries

suspend fun fundamentalsTimeseries(symbol: String, types: List<FundamentalsType>, startDate: LocalDate? = null, endDate: LocalDate? = null): FundamentalsTimeseriesResult(source)

Fetches fundamentals timeseries data from the Yahoo Finance Fundamentals Timeseries API.

Retrieves timeseries data for financial statement items from Yahoo Finance. Provides annual, quarterly, and trailing data for items from income statements, balance sheets, and cash flow statements.

Return

FundamentalsTimeseriesResult containing timeseries data organized by type

Parameters

symbol

The stock symbol to query (e.g., "AAPL", "GOOGL")

types

List of FundamentalsType to retrieve (e.g., ANNUAL_TOTAL_REVENUE, QUARTERLY_NET_INCOME)

startDate

Start date for the query (default: 5 years ago)

endDate

End date for the query (default: today)

Throws

If symbol is blank or types list is empty

If the API call fails or returns an error response

Usage examples:

// Retrieve annual revenue and quarterly net income
val result = yahooClient.fundamentalsTimeseries(
"AAPL",
listOf(
FundamentalsType.ANNUAL_TOTAL_REVENUE,
FundamentalsType.QUARTERLY_NET_INCOME
)
)

// Retrieve data for a specific date range
val result = yahooClient.fundamentalsTimeseries(
"AAPL",
listOf(FundamentalsType.TRAILING_EPS),
startDate = LocalDate.of(2020, 1, 1),
endDate = LocalDate.of(2023, 12, 31)
)