Credit markets often show stress before stocks do. The data to watch that is public, but it is scattered: the New York Fed publishes its corporate bond distress index as a spreadsheet behind an interactive page, the Treasury posts its corporate yield curve as old .xls files in five-year blocks, and the CFTC releases a new Excel workbook every week, with four different layouts since 2012.
The Quotelinks Credit Market Data API parses all three and serves them as plain JSON:
- no API key, no sign-up
- full history in every response: weekly since 2005, monthly since 1984, weekly since 2012
- CORS enabled, so it works straight from the browser
Try it
curl --compressed "https://api.quotelinks.com/v1/credit/cmdi/latest" { "dataset": "cmdi", "title": "Corporate Bond Market Distress Index", "source": "Federal Reserve Bank of New York", "credit": "Federal Reserve Bank of New York, Corporate Bond Market Distress Index Report", "frequency": "weekly", "units": "index, 0 (no distress) to 1 (max distress); percentiles = distribution of the market index as of each week", "as_of": "2026-10-23", "updated": "2026-11-24T16:23:09Z", "data": { "date": "2026-10-23", "market": 0.25, "ig": 0.25, "hy": 0.16, "percentiles": {"p5": 0.09, "p10": 0.1, "p25": 0.14, "p50": 0.2, "p75": 0.31, "p90": 0.47, "p95": 0.58, "p99": 0.76}, "recession": false } } Every response starts with the same block: dataset, title, source, credit (the attribution line to show next to the data), frequency, units, as_of (newest observation) and updated (when the API was last rebuilt). The values are in data, oldest first.
The three datasets
| Dataset | What it measures | Source | Frequency | Since |
|---|---|---|---|---|
| CMDI | Corporate Bond Market Distress Index, 0 (calm) to 1 (max distress), for the whole market, investment grade and high yield | Federal Reserve Bank of New York | weekly values | 2005-01-07 |
| HQM | High Quality Market corporate bond yield curve: par yields (2, 5, 10, 30 years) and spot rates from 0.5 to 100 years | U.S. Department of the Treasury | monthly | 1984-01 |
| CDS | Credit default swap gross notional, trade count and dollar volume, by cleared/uncleared, IG/HY and region | CFTC Weekly Swaps Report | weekly | 2012-11-09 |
Endpoints
Base URL: https://api.quotelinks.com/v1/credit/. All endpoints are GET with no query parameters.
| Path | Returns |
|---|---|
/v1/credit/ | list of datasets with as_of and endpoints |
/v1/credit/cmdi | full weekly CMDI history |
/v1/credit/cmdi/latest | latest week only |
/v1/credit/hqm/par | monthly par yields (2y, 5y, 10y, 30y) since 1984 |
/v1/credit/hqm/spot/{maturity} | spot-rate history for one maturity, e.g. /hqm/spot/10 |
/v1/credit/hqm/curve/{YYYY-MM} or /curve/latest | the whole spot curve for one month |
/v1/credit/hqm/eom/... | the same, using end-of-month values instead of monthly averages |
/v1/credit/hqm/maturities | valid maturities (0.5 to 100 in 0.5 steps) |
/v1/credit/cds | latest weekly CDS snapshot with the full tables |
/v1/credit/cds/{YYYY-MM-DD} | one report week |
/v1/credit/cds/history | weekly headline numbers since 2012 |
/v1/credit/cds/dates | available report weeks |
Example 1: a weekly credit check in Python
This script answers three questions: how stressed is the corporate bond market compared with its own history, what do high-grade companies pay to borrow, and is CDS activity rising or falling?
import json import urllib.request BASE = "https://api.quotelinks.com/v1/credit" def get(path): req = urllib.request.Request(f"{BASE}/{path}", headers={"User-Agent": "credit-check/1.0"}) with urllib.request.urlopen(req, timeout=30) as r: return json.load(r) # 1. Corporate bond distress vs. its own history cmdi = get("cmdi/latest")["data"] p = cmdi["percentiles"] if cmdi["market"] >= p["p90"]: band = "high (top 10% of history)" elif cmdi["market"] >= p["p75"]: band = "elevated" elif cmdi["market"] >= p["p25"]: band = "normal" else: band = "calm" print(f"CMDI {cmdi['date']}: market {cmdi['market']}, IG {cmdi['ig']}, HY {cmdi['hy']} -> {band}") # 2. High-grade corporate yields: latest month vs. a year earlier par = get("hqm/par")["data"] m, y = par[-1], par[-13] print(f"HQM {m['month']}: 2y {m['2y']}% 10y {m['10y']}% 30y {m['30y']}% " f"(10y-2y {m['10y'] - m['2y']:.2f} pp; 10y in {y['month']}: {y['10y']}%)") # 3. CDS activity: compare only weeks reported under the same CFTC methodology hist = get("cds/history")["data"] same = [w for w in hist if w["methodology"] == hist[-1]["methodology"]] now, before = same[-1], same[-5] change = 100 * (now["notional"]["total"] / before["notional"]["total"] - 1) print(f"CDS {now['date']}: gross notional ${now['notional']['total'] / 1e6:.2f}T " f"(IG ${now['notional']['ig'] / 1e6:.2f}T, HY ${now['notional']['hy'] / 1e6:.2f}T), " f"{now['tickets']['total']:,} trades; {change:+.1f}% vs. {before['date']}") Output on November 25, 2026:
CMDI 2026-10-23: market 0.25, IG 0.25, HY 0.16 -> normal HQM 2026-10: 2y 5.16% 10y 5.92% 30y 6.43% (10y-2y 0.76 pp; 10y in 2025-10: 4.75%) CDS 2026-11-06: gross notional $8.27T (IG $6.39T, HY $1.31T), 12,215 trades; -1.9% vs. 2026-10-09 A few things worth knowing about the numbers:
- CMDI percentiles come with every week, so you don't need to download the whole history to know whether 0.25 is high. Here it sits between the 50th and 75th percentile: normal.
- CDS notional is in millions of USD, so
8268686is about $8.27 trillion. - Don't join CDS weeks across methodologies. The CFTC changed its method in December 2022 (it removed duplicates across swap data repositories), and the first year of reports (Nov 2012 to Nov 2013) used estimated figures about 2.5x later levels. Each week carries a
methodologytag, and the script above only compares like with like.
Example 2: the corporate yield curve in the browser
Because CORS is on, a few lines of JavaScript can pull the full HQM spot curve for the latest month and compare it with the same month a year earlier:
const BASE = "https://api.quotelinks.com/v1/credit"; const get = async (path) => { const r = await fetch(`${BASE}/${path}`); if (!r.ok) throw new Error(`${r.status} ${(await r.json()).message}`); return r.json(); }; const latest = await get("hqm/curve/latest"); const [yyyy, mm] = latest.data.month.split("-"); const yearAgo = await get(`hqm/curve/${Number(yyyy) - 1}-${mm}`); const pick = (curve, years) => curve.data.spot.find((p) => p.maturity === years)?.rate; for (const t of [1, 2, 5, 10, 20, 30]) { console.log(`${t}y`.padStart(4), `${pick(yearAgo, t)}% -> ${pick(latest, t)}%`); } console.log(latest.credit); Output (October 2025 vs. October 2026, monthly averages):
1y 3.95% -> 4.8% 2y 3.93% -> 5.17% 5y 4.19% -> 5.54% 10y 4.85% -> 6.02% 20y 5.53% -> 6.45% 30y 5.73% -> 6.81% U.S. Department of the Treasury, HQM Corporate Bond Yield Curve High-grade corporate borrowing costs rose by roughly 0.9 to 1.4 percentage points across the curve in a year.
Swap hqm/curve/... for hqm/eom/curve/... if you want end-of-month values instead of monthly averages.
Errors and limits
Errors are JSON with the HTTP status and a message. For example, /v1/credit/hqm/spot/150 (the curve stops at 100 years):
{"status": 404, "message": "No data for this date, month or maturity. See /v1/credit/cds/dates (weekly as-of dates, Fridays) or /v1/credit/hqm/maturities (0.5 to 100 in 0.5 steps)."} - Fair use: up to 2 requests per second per IP address (10 per second with a free key). On
429, wait forRetry-Afterand retry. - The data changes at most once a week, and responses are cached for up to an hour, so cache on your side too.
- Data release timing: CMDI monthly (last Wednesday), HQM usually in the first half of the following month, CDS weekly with about a two-week lag.
The fine print
- The API is free for personal, non-commercial use; redistributing the data is not allowed. For commercial use, contact the Quotelinks team. Details: Terms of Service.
- When you show the data, credit the source with the line in the
creditfield. - The Corporate Bond Market Distress Index is not an official estimate of the Federal Reserve Bank of New York, its President, the Federal Reserve System, or the Federal Open Market Committee. Quotelinks is not affiliated with the NY Fed, the Treasury or the CFTC.
- Not included: CDS spreads or prices, bond prices, ratings, or single-issuer data.
Links
- Docs and an in-browser "Try it" console: Credit Market Data API
- All free Quotelinks APIs (SEC fundamentals, stock news, exchange rates): quotelinks.com/api
- Earlier post: a free stock news API with sentiment and topic tags
If you build something with it, or a number looks off compared with the original report, leave a comment.