Treasury Yields & Economic Data API: yield curve, CPI, jobs and debt as JSON
Daily Treasury par yields since 1990, national debt, average interest rates, CPI, PPI, unemployment, payrolls, wages and JOLTS in one JSON shape.
curl -H "Authorization: Bearer $SECFEED_KEY" \ "https://secfeedapi.com/v1/treasury/yield-curve?size=5"
import os, requests
r = requests.get(
"https://secfeedapi.com/v1/treasury/yield-curve",
params={'size': '5'},
headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
)
print(r.json())Overview
Macro numbers sit in flat files, CSV downloads and agency APIs that each have their own layout. This API puts a curated set of headline series behind one shape: a series id, a unit, a frequency and dated values.
Treasury series cover the daily par yield curve for every tenor since 1990, total public debt outstanding and the average interest rate on bills, notes and bonds. Bureau of Labor Statistics series cover CPI-U (headline, core, food, energy, shelter), PPI final demand, unemployment and participation, nonfarm payrolls, average hourly earnings and JOLTS job openings. Filing dates and macro data in one place make it easy to line up an 8-K or a 10-Q with the rates and inflation of that day.
Source: U.S. Department of the Treasury and U.S. Bureau of Labor Statistics, public domain. Values are as published; a later revision replaces the earlier value.
What you get
Built for developers who would rather not parse EDGAR.
Every tenor per date from one call.
CPI, PPI, unemployment, payrolls, wages and JOLTS.
Series id, unit, frequency and dated values.
Treasury and BLS, refreshed daily.
Endpoints
Authenticate with Authorization: Bearer YOUR_KEY. Responses are JSON.
US economic data series (Treasury yields, debt, CPI, PPI, unemployment, payrolls, wages, JOLTS). Source: U.S. Treasury and Bureau of Labor Statistics, public domain.
Parameters: q (words), source (treasury | bls), size (max 200)
Dated values of one series. Source: U.S. Treasury and Bureau of Labor Statistics, public domain.
Parameters: series (required) | startDate, endDate, order (asc | desc), size (max 5000)
Daily Treasury par yield curve since 1990, every tenor per date. Source: U.S. Department of the Treasury, public domain.
Parameters: startDate, endDate, size (max 1000)
Response fields
The main fields in every result. The raw filing data is always one level down.
| Field | Meaning |
|---|---|
series[].id, name, unit, frequency | What the series is, e.g. bls.cusr0000sa0. |
series[].firstDate, lastDate, observations | Coverage of the series. |
observations[].date, value | One value per period. |
curves[].date, yields | Par yields in percent keyed by tenor. |
Use cases
- Charting rates against filings and earnings dates
- Discounting and spread models that need the daily curve
- Inflation and labor context for research notes and agents
FAQ
Where does the data come from?
U.S. Treasury (fiscaldata and daily par yield curve) and Bureau of Labor Statistics flat files, public domain.
Is every BLS series included?
No. About 40 headline series. Search /v1/economic/series for what is loaded.
Are GDP and PCE included?
Not yet.
Try the Treasury Yields & Economic Data API free
Free key, no card, no sales call.