72trust / 100

Macro

by x402stock.xyz in Markets & finance

x402 APIPassing, checked 11 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
Price
$0.05
per call in USDC
Uptime
98.4%
last 30 days
Response time
498 ms
1.1 s slowest 5%
Last check
Passed
11 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

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

Each call costs $0.05 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

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

Example response

The provider's example. We can't check it without paying.

Example response, 168 lines
{
  "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.5mo": 3.71,
          "10yr": 4.19,
          "1mo": 3.72,
          "1yr": 3.47,
          "20yr": 4.81,
          "2mo": 3.66,
          "2yr": 3.47,
          "30yr": 4.86,
          "3mo": 3.65,
          "3yr": 3.55,
          "4mo": 3.62,
          "5yr": 3.74,
          "6mo": 3.58,
          "7yr": 3.95
        }
      }
    ],
    "series": "daily_treasury_par_yield_curve",
    "source": "us_treasury",
    "unit": "percent"
  }
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.05.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://x402stock.xyz/api/v1/macro'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://x402stock.xyz/api/v1/macro' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.05 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.05" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.05 per payment. 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(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.05 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.05"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://x402stock.xyz/api/v1/macro")
    print(res.status_code, res.text)

Security scan

No findings

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

Recent checks

WhenResultHTTPTimePrice
11 h agoPassed4021.0 s$0.05
28 h agoPassed402801 ms$0.05
44 h agoPassed4021.1 s$0.05
3 days agoPassed402498 ms$0.05
4 days agoTimed out---
Show 10 older checks
6 days agoPassed402349 ms$0.05
7 days agoPassed402883 ms$0.05
7 days agoPassed402274 ms$0.05
8 days agoPassed402332 ms$0.05
9 days agoPassed4021.0 s$0.05
9 days agoPassed4021.1 s$0.05
10 days agoPassed402961 ms$0.05
10 days agoPassed402448 ms$0.05
11 days agoPassed402397 ms$0.05
11 days agoPassed4021.0 s$0.05