Macro economics
Pull the canonical US macro dataset - yield curve, CPI, unemployment, fed funds, Sahm rule - without an API key.
7 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.
When to use this pack
Producing a weekly macro note, charting the recession-indicator dashboard, or feeding a model with the latest FRED/Treasury data.
Tools in this pack
All 7 run inside the single $0.032 call above. Each is also callable on its own if you only need one part.
- US Treasury daily yield curve GET /api/treasury-yield-curve Latest US Treasury daily constant-maturity yield curve in one object: recordDate plus mo1, mo3, mo6, yr1, yr2, yr3, yr5, yr7, yr10, yr20 and yr30, each a yield in percent. Source: FRED DGS* series (St. Louis Fed), public domain. No params - always returns the most recent published curve, which trails today by a business day or two; for a date range use treasury-yield-history.
- Treasury yield-curve spreads + inversion GET /api/yield-curve-spread Derived 2s10s and 3m10y Treasury yield-curve spreads (in basis points) plus a boolean recession-signal flag when the curve is inverted. Source: FRED constant-maturity yields (public domain). No params.
- US CPI year-over-year inflation GET /api/cpi-yoy Latest US Consumer Price Index year-over-year inflation rate (headline CPI-U) plus the trailing 12 months of YoY readings - the headline inflation number. Source: FRED CPIAUCSL with pc1 transformation. No params.
- US unemployment rate (UNRATE) GET /api/unemployment-rate Latest US unemployment rate (current, as of date) plus a trailing N-month history of {date, value} for trend, seasonally adjusted, in percent. Source: FRED UNRATE (Bureau of Labor Statistics). A month with no published value is listed in missingDates rather than dropped silently. ?months=12 (1-120, default 12). This product uses the FRED(R) API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.
- Effective federal funds rate GET /api/fed-funds Current effective federal funds rate (current, as of date, in percent) plus a trailing N-day history of {date, value}. Source: FRED DFF (Board of Governors), a daily series that includes weekends. ?days=30 (1-365, default 30). This product uses the FRED(R) API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.
- Sahm Rule recession indicator GET /api/sahm-rule Real-time Sahm Rule recession indicator from FRED (SAHMREALTIME series). The Sahm Rule triggers when the 3-month moving average of US unemployment rises ≥0.50 percentage points above its prior-12-month low - historically a clean recession signal. No params.
- FRED economic release calendar GET /api/fred-release-calendar Upcoming and very-recent US economic data release dates - CPI, employment, GDP, FOMC minutes, Treasury auctions, etc. Useful for scheduling agents around event-driven moves. ?days=14 (default 14, range 1-90). This product uses the FRED(R) API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.
Bought one at a time, these 7 tools cost $0.035 together; the pack is that sum less a 10% bundle discount, rounded up to the $0.001 settlement floor, which is $0.032.
Workflow
- Pull the live Treasury yield curve (all maturities from 1M to 30Y) - the base data for every spread/inversion chart.
- Get the 10Y–2Y and 10Y–3M spreads from yield-curve-spread; the latter is the NY Fed's preferred recession indicator.
- Pull CPI YoY (cpi-yoy) for the headline and core inflation read.
- Pull the headline unemployment rate (unemployment-rate) - the U-3 series.
- Get the effective fed funds rate (fed-funds) for the current policy stance.
- Compute the Sahm rule (sahm-rule) - a real-time recession indicator that triggers when the 3-month unemployment average rises >0.5pp above its 12-month low.
- Pull the upcoming FRED release calendar (fred-release-calendar) so the brief can flag what's hitting this week.
What one call returns
A JSON object with pack, args, steps, summary; steps holds one entry per tool (treasury-yield-curve, yield-curve-spread, cpi-yoy, unemployment-rate, fed-funds, sahm-rule, fred-release-calendar), each with its own result or error. Full example on the API page.
Call it directly
Any x402 client pays the 402 and gets the whole workflow back in one response. With the agent402-client SDK (npm i agent402-client, an ES module):
import { Agent402 } from "agent402-client";
// payFetch: an x402-wrapped fetch your wallet signs (@x402/fetch).
// Tools on the free tier need no options: new Agent402() pays them by proof-of-work.
// an existing prepaid credits key also works: new Agent402({ creditsKey })
const client = new Agent402({ fetch: payFetch });
const result = await client.call("skill-macro-economics", {});
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Build today's macro dashboard. Use Agent402 to pull the Treasury yield curve, 10Y–2Y and 10Y–3M spreads, latest CPI YoY, unemployment rate, fed funds rate, and the Sahm rule reading. Highlight any indicator that is at a multi-year extreme, and list FRED releases scheduled for this week.