Quick answer
FRED, from the Federal Reserve Bank of St. Louis, offers 800,000+ free economic time series (rates, yield curves, CPI, unemployment, GDP, credit spreads) through a REST API with a free key. ALFRED adds every past vintage of each series, so a macro backtest can use the number as it was first published rather than today’s revised value.
FRED (St. Louis Fed) API at a glance
- Pricing
- Free
- Availability
- Worldwide
- Paper trading
- Not applicable (data only)
- Integration type
- REST + API key
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Auth
- Free
api_keyparameter - Examples
DGS10,T10Y2Y,CPIAUCSL,UNRATE,BAMLH0A0HYM2- Vintages
realtime_start/realtime_end(ALFRED)
Point-in-time macro with ALFRED
Request observations with realtime_start and realtime_end set to a past date to see the series as it was known then. Payrolls and GDP are revised heavily; using final values in a backtest leaks the future.
Build a FRED (St. Louis Fed) strategy with AlgoGP
AlgoGP does not connect to FRED (St. Louis Fed) natively yet. FRED (St. Louis Fed) uses plain HTTPS with an API key, so it is a good candidate for a native adapter; it is not built in yet.
- 1
Design and backtest in AlgoGP
Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.
- 2
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in FRED (St. Louis Fed)
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with FRED (St. Louis Fed)’s SDK, or keep a built-in platform for paper trading and add FRED (St. Louis Fed) when you go live.
Built-in data sources for the same markets: Yahoo Finance, OANDA, Massive (Polygon.io), Twelve Data.
FRED (St. Louis Fed) API: frequently asked questions
Is the FRED API free?
Yes, with a free key and generous rate limits.
Can I get the 10-year Treasury yield from FRED?
Yes, series DGS10 (daily).
Design and backtest your FRED (St. Louis Fed) strategy first
AlgoGP turns an idea into Python and tests it on years of history before you connect it to FRED (St. Louis Fed). The exported code keeps the broker behind four small adapter methods.
- AI copilot writes and revises the rules
- Backtests with realistic costs
- Exported Python ready to wire to FRED (St. Louis Fed)
Free plan, no card required.
FRED (St. Louis Fed) alternatives
- Nasdaq Data Link API GuideFormerly Quandl: a marketplace of financial, economic and alternative datasets behind one REST API.
- Alpha Vantage API Built into AlgoGP (data)Free API key for stock, forex and crypto time series plus technical indicators and fundamentals.
- Financial Modeling Prep API Built into AlgoGP (data)Fundamentals, earnings, transcripts and end-of-day prices for global equities in one REST API.
- EODHD API Built into AlgoGP (data)EOD Historical Data: global end-of-day and intraday prices for 150k+ tickers, fundamentals, FX and crypto at low cost.
Frameworks that connect to FRED (St. Louis Fed)
Independent guide. AlgoGP is not affiliated with FRED (St. Louis Fed). Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.