get_source_releases#

async AsyncAPI.get_source_releases(source_id, realtime_start=None, realtime_end=None, limit=None, offset=None, order_by=None, sort_order=None)#

Get FRED source releases

Get the releases for a specified source from the FRED API.

Parameters:
  • source_id (int) – The ID for the source.

  • realtime_start (str | datetime, optional) – The start of the real-time period. String format: YYYY-MM-DD.

  • realtime_end (str | datetime, optional) – The end of the real-time period. String format: YYYY-MM-DD.

  • limit (int, optional) – The maximum number of results to return.

  • offset (int, optional) – The offset for the results.

  • order_by (str, optional) – Order results by values such as ‘release_id’, ‘name’, etc.

  • sort_order (str, optional) – Sort order of results. ‘asc’ for ascending, ‘desc’ for descending.

Returns:

If multiple Releases are returned.

Return type:

List[Releases]

Raises:

ValueError – If the request to the FRED API fails or returns an error.

Example

>>> import fedfred as fd
>>> import asyncio
>>> async def main():
>>>     fred = fd.FredAPI('your_api_key')
>>>     releases = await fred.get_source_releases(1)
>>>     for release in releases:
>>>         print(release.name)
>>> asyncio.run(main())
'G.17 Industrial Production and Capacity Utilization'
'G.19 Consumer Credit'
'G.5 Foreign Exchange Rates'...
FRED API Documentation:

https://fred.stlouisfed.org/docs/api/fred/source_releases.html