81trust / 100

Macro

by x402stock.xyz in Markets & finance

x402 APIPassing, checked 4 h ago

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

GET https://x402stock.xyz/api/v1/macro

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
231 ms typical, 231 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://x402stock.xyz/api/v1/macro"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402stock.xyz%2Fapi%2Fv1%2Fmacro
const res = await pay("https://x402stock.xyz/api/v1/macro");
console.log(await res.json());

Example input

{}

Example output

{
  "as_of": "2026-06-04T12:00:00.000Z",
  "cpi": {
    "as_of": "2026-04-01T00:00:00.000Z",
    "core": {
      "latest_index": 326.18,
      "latest_month": "2026-04",
      "yoy_percent": 3.1
    },
    "headline": {
      "latest_index": 320.32,
      "latest_month": "2026-04",
      "yoy_percent": 2.7
    },
    "history": [
      {
        "date": "2026-04",
        "period_name": "April",
        "value": 320.32
      }
    ],
    "series": "cpi_u_us_city_average",
    "source": "us_bls",
    "unit": "index_1982_84=100"
  },
  "fed_funds": {
    "as_of": "2026-05-01T00:00:00.000Z",
    "change": 0,
    "change_percent": 0,
    "frequency": "monthly",
    "history": [
      {
        "date": "2026-05-01",
        "value": 4.33
      }
    ],
    "latest": {
      "date": "2026-05-01",
      "value": 4.33
    },
    "prior": {
      "date": "2026-04-01",
      "value": 4.33
    },
    "series_id": "FEDFUNDS",
    "source": "fred",
    "title": "Effective Federal Funds Rate",
    "unit": "percent",
    "yoy_percent": -2.8
  },
  "gdp": {
    "as_of": "2026-01-01T00:00:00.000Z",
    "change": 122.3,
    "change_percent": 0.52,
    "frequency": "quarterly",
    "history": [
      {
        "date": "2026-01-01",
        "value": 23512.4
      }
    ],
    "latest": {
      "date": "2026-01-01",
      "value": 23512.4
    },
    "prior": {
      "date": "2025-10-01",
      "value": 23390.1
    },
    "series_id": "GDPC1",
    "source": "fred",
    "title": "Real Gross Domestic Product",
    "unit": "billions_of_chained_2017_usd_saar",
    "yoy_percent": 2.4
  },
  "labor": {
    "as_of": "2026-04-01T00:00:00.000Z",
    "metrics": [
      {
        "change": -0.1,
        "latest_month": "2026-04",
        "latest_value": 4.1,
        "metric": "unemployment_rate",
        "prior_value": 4.2,
        "unit": "percent"
      }
    ],
    "series": "us_labor_market_headline",
    "source": "us_bls"
  },
  "pce": {
    "as_of": "2026-04-01T00:00:00.000Z",
    "core": {
      "latest_index": 128.9,
      "latest_month": "2026-04-01",
      "series_id": "PCEPILFE",
      "yoy_percent": 2.6
    },
    "headline": {
      "latest_index": 127.4,
      "latest_month": "2026-04-01",
      "series_id": "PCEPI",
      "yoy_percent": 2.3
    },
    "history": [
      {
        "date": "2026-04-01",
        "value": 127.4
      }
    ],
    "series": "pce_price_index",
    "source": "fred",
    "unit": "index_2017=100"
  },
  "sections": {
    "cpi": "ok",
    "fed_funds": "ok",
    "gdp": "ok",
    "labor": "ok",
    "pce": "ok",
    "treasury_yields": "ok"
  },
  "source": "x402stock",
  "treasury_yields": {
    "as_of": "2026-05-29T00:00:00.000Z",
    "count": 1,
    "maturities": [
      "1mo",
      "1.5mo",
      "2mo",
      "3mo",
      "4mo",
      "6mo",
      "1yr",
      "2yr",
      "3yr",
      "5yr",
      "7yr",
      "10yr",
      "20yr",
      "30yr"
    ],
    "rates": [
      {
        "date": "2026-05-29",
        "rates": {
          "1.5m

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402231 ms$0.05