Help / Connect your data
Connect FRED for economic figures
US economic figures chart as symbols of their own, and scripts and alerts can read them, with your own free key from the Federal Reserve Bank of St. Louis (FRED).
Step by step#
- Go to fred.stlouisfed.org and make a free account.
- Open My Account › API Keys and request a key. It’s 32 letters and digits.
- Open the Account page and find Economic data (FRED). Paste the key and press Save key. FRED is asked whether it works first.
- On the chart, search for a figure by name (
CPI,unemployment,Treasury); they’re under the Indices tab. Their ids work too:econ:cpi,econ:unemployment,econ:fedFunds,econ:gdp,econ:pce,econ:retailSales,econ:claims,econ:treasury2yandecon:treasury10y. - Any other FRED series opens by its FRED id:
econ:fred/DCOILWTICO(oil),econ:fred/VIXCLS,econ:fred/M2SL. Searching by name finds them too, each as first released and once more as revised (econ:fred/M2SL/revised: today’s figures at the dates they measure, so not as they were known at the time).
Note:Each reading is dated from the day after it was first published, and shows the figure as first published, so a backtest never sees a number before it existed.
Also with the key#
- The economic calendar shows FRED’s latest figures and release dates.
- Scripts can use
request.economic, on the chart and in alerts.
TradingView and Pine Script are trademarks of TradingView, Inc. OpenTapefolio is not affiliated with or endorsed by TradingView.