FRED Series with Custom Header Authentication
November 8, 2025 ยท View on GitHub
A simple OpenBB Workspace app that fetches FRED economic data using API key authentication via custom headers.
Features
- Custom Header Authentication: API key passed via
X-FRED-API-KEYheader when connecting to OpenBB Workspace - Multi-Series Support: Fetch multiple FRED series simultaneously (e.g.,
GDP,UNRATE,CPIAUCSL) - Interactive Visualization: Line charts with table/chart toggle
Setup
-
Install Dependencies:
pip install -r requirements.txt -
Run the Application:
uvicorn main:app --reload --port 8002 -
Add to OpenBB Workspace:
- Add new backend with URL:
http://localhost:8002 - Add custom header:
- Name:
X-FRED-API-KEY - Value:
your_fred_api_key_here
- Name:
- Add new backend with URL:
Getting a FRED API Key
- Visit FRED API Key page
- Create a free account
- Generate your API key
Example Series IDs
SP500- S&P 500 IndexGDP- Gross Domestic ProductUNRATE- Unemployment RateFEDFUNDS- Federal Funds RateCPIAUCSL- Consumer Price Index