series

suspend fun series(seriesId: String, startDate: LocalDate? = null, endDate: LocalDate? = null, frequency: DataFrequency? = null): FredSeries(source)

Fetches FRED time series data.

Retrieves both series metadata and observation values for the specified series.

Return

FRED series data containing metadata and observations

Parameters

seriesId

The series ID (e.g., "GDP", "UNRATE", "DFF")

startDate

The start date for observations (null to fetch from the beginning of the series)

endDate

The end date for observations (null to fetch to the end of the series)

frequency

The data frequency (null to use the original frequency)

Throws

if seriesId is blank

NoSuchElementException

if the series cannot be found

if API authentication fails or rate limit is exceeded