Skip to content
Docs
Get API key
Federal Reserve

Federal Reserve Historical Data

Use the following API endpoints to obtain Federal Reserve historical data.

The historical endpoint contains a time series with an indicator identifier, the reference date and the observed value. It allows one to check the evolution of key indicators over time.

By symbol

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/fred/historical/RACEDISPARITY005007,2020RATIO002013?c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
import tradingeconomics as te
te.login('your_api_key')
te.getFedRHistorical(symbol = 'racedisparity005007')  

With multi symbols

Python
te.getFedRHistorical(symbol = ['racedisparity005007', '2020ratio002013'])  

The response data format can be configured by appending the &f= parameter to the URL request.

Text
https://api.tradingeconomics.com/fred/historical/{symbols}?c={your_api_key}&f=json
JSON
[
  {
    "symbol": "racedisparity005007",
    "date": "2009-01-01T00:00:00",
    "value": 33.603
  },
  {
    "symbol": "2020ratio002013",
    "date": "2010-01-01T00:00:00",
    "value": 9.5066
  },
  {
    "symbol": "racedisparity005007",
    "date": "2010-01-01T00:00:00",
    "value": 36.2968
  }
]

By symbol and a date

It’s possible to use multiple symbols.

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/fred/historical/BAMLC0A1CAAAEY?d1=2017-05-01&d2=2019-01-01&c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
te.getFedRHistorical(symbol = 'BAMLC0A1CAAAEY', initDate = '2017-05-01')

With end date:

Python
te.getFedRHistorical(symbol = 'BAMLC0A1CAAAEY', initDate = '2017-05-01',
 endDate = '2019-01-01')
Text
https://api.tradingeconomics.com/fred/historical/{symbols}?c={your_api_key}&d1={yyyy-mm-dd}&d2={yyyy-mm-dd}&f=json
JSON
[
  {
    "symbol": "bamlc0a1caaaey",
    "date": "2017-05-01T00:00:00",
    "value": 3.03
  },
  {
    "symbol": "bamlc0a1caaaey",
    "date": "2017-05-02T00:00:00",
    "value": 2.99
  },
  {
    "symbol": "bamlc0a1caaaey",
    "date": "2017-05-03T00:00:00",
    "value": 2.99
  }
]

Response fields

FieldTypeDescriptionExample
SymbolstringUnique symbol used by Trading Economics“racedisparity005007”
DatestringDate when the historical data point was released (in UTC)“2009-01-01T00:00:00”
ValuenumberReported value for the historical on the given date33.6030