# x402stock US Macro Data API

> x402stock US Macro Data API is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.05/call, status healthy (last checked 2026-09-14, last successful call 2026-09-02).

Returns a comprehensive snapshot of US macroeconomic indicators including CPI, GDP, PCE, labor market data, Fed funds rate, and Treasury yields

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/macro
- Price: $0.05/call
- Payment: x402
- Status: healthy
- Last checked: 2026-09-14
- Last successful call: 2026-09-02
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-us-macro-data-api-e6bc2e60
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MWaq7m1V_qctLMUImLXWE

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402stock-us-macro-data-api-e6bc2e60
```

Example prompt: Pull me the full US macro snapshot — CPI, GDP, PCE, unemployment, Fed funds rate, and Treasury yields — all in one call, no API key needed, paying per request in USDC.

## When to prefer this

Use this endpoint when you need a single consolidated US macroeconomic dashboard — CPI, GDP, PCE, labor, Fed rate, and Treasury yields — in one pay-per-call request with no API key or subscription. Prefer this over individual FRED or BLS API calls when you want pre-aggregated macro data for AI agent workflows, especially when operating in a no-account, micropayment (USDC/x402) environment.

## Known failure modes

- HTTP 402 Payment Required if USDC payment via x402/Base is not attached or insufficient
- HTTP 400 if properties parameter is malformed
- Partial data sections may return status other than 'ok' if upstream BLS/FRED sources are delayed or unavailable
- Truncated history arrays if upstream data source has gaps or rate limits

## How this service works

The US macro backdrop in one call: the federal funds rate, CPI and PCE inflation, the labor market (unemployment, payrolls, wages), real GDP, and the Treasury yield curve. No ticker needed. Replaces six macro calls (fed-funds + inflation + pce + labor-market + gdp + treasury-yields) at a lower combined price. Spans FRED, BLS, Treasury; sections degrade independently. From x402stock

## Output

A JSON object containing the latest values, historical series, and year-over-year changes for: CPI (headline and core), real GDP, PCE price index (headline and core), labor market metrics (unemployment rate), effective Fed funds rate, and Treasury yield curve across maturities (1mo to 30yr), each with source attribution and as-of timestamps.

## Example request

```json
{
 "properties": "cpi,unemployment,gdp"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cpi": {
   "core": {
    "yoy_percent": 3.1,
    "latest_index": 326.18,
    "latest_month": "2026-04"
   },
   "unit": "index_1982_84=100",
   "as_of": "2026-04-01T00:00:00.000Z",
   "series": "cpi_u_us_city_average",
   "source": "us_bls",
   "history": [
    {
     "date": "2026-04",
     "value": 320.32,
     "period_name": "April"
    }
   ],
   "headline": {
    "yoy_percent": 2.7,
    "latest_index": 320.32,
    "latest_month": "2026-04"
   }
  },
  "gdp": {
   "unit": "billions_of_chained_2017_usd_saar",
   "as_of": "2026-01-01T00:00:00.000Z",
   "prior": {
    "date": "2025-10-01",
    "value": 23390.1
   },
   "title": "Real Gross Domestic Product",
   "change": 122.3,
   "latest": {
    "date": "2026-01-01",
    "value": 23512.4
   },
   "source": "fred",
   "history": [
    {
     "date": "2026-01-01",
     "value": 23512.4
    }
   ],
   "frequency": "quarterly",
   "series_id": "GDPC1",
   "yoy_percent": 2.4,
   "change_percent": 0.52
  },
  "pce": {
   "core": {
    "series_id": "PCEPILFE",
    "yoy_percent": 2.6,
    "latest_index": 128.9,
    "latest_month": "2026-04-01"
   },
   "unit": "index_2017=100",
   "as_of": "2026-04-01T00:00:00.000Z",
   "series": "pce_price_index",
   "source": "fred",
   "history": [
    {
     "date": "2026-04-01",
     "value": 127.4
    }
   ],
   "headline": {
    "series_id": "PCEPI",
    "yoy_percent": 2.3,
    "latest_index": 127.4,
    "latest_month": "2026-04-01"
   }
  },
  "as_of": "2026-06-04T12:00:00.000Z",
  "labor": {
   "as_of": "2026-04-01T00:00:00.000Z",
   "series": "us_labor_market_headline",
   "source": "us_bls",
   "metrics": [
    {
     "unit": "percent",
     "change": -0.1,
     "metric": "unemployment_rate",
     "prior_value": 4.2,
     "latest_month": "2026-04",
     "latest_value": 4.1
    }
   ]
  },
  "source": "x402stock",
  "sections": {
   "cpi": "ok",
   "gdp": "ok",
   "pce": "ok",
   "labor": "ok",
   "fed_funds": "ok",
   "treasury_yields": "ok"
  },
  "fed_funds": {
   "unit": "percent",
   "as_of": "2026-05-01T00:00:00.000Z",
   "prior": {
    "date": "2026-04-01",
    "value": 4.33
   },
   "title": "Effective Federal Funds Rate",
   "change": 0,
   "latest": {
    "date": "2026-05-01",
    "value": 4.33
   },
   "source": "fred",
   "history": [
    {
     "date": "2026-05-01",
     "value": 4.33
    }
   ],
   "frequency": "monthly",
   "series_id": "FEDFUNDS",
   "yoy_percent": -2.8,
   "change_percent": 0
  },
  "treasury_yields"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-us-macro-data-api-e6bc2e60/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
