High Granular Tick Data API: US Stocks Learn more

Credit and Sovereign Risk Data API

In plans: Fundamentals and All-in-one plans
5 API calls per request ?
Resources: Coding Libraries



The EODHD Credit and Sovereign Risk Data API brings credit-market and sovereign-risk indicators into one API, drawn entirely from official public sources. It closes a long-standing gap in EODHD coverage for credit analysts, sovereign-risk and EM macro desks, quant researchers, corporate treasury, and academic users.

Seven endpoints are grouped into three themes: corporate credit conditions (the NY Fed corporate bond distress index and the HQM corporate yield curve), CDS market aggregates (weekly CFTC swaps data), and sovereign risk (risk premiums, credit ratings, CDS spreads, and rating-based default spreads). All seven share the same authentication, the same JSON response envelope, and a cost of one API call per request.

Overview

All endpoints live under a common base path:

https://eodhd.com/api/credit-risk/{group}/{dataset}?api_token=YOUR_TOKEN

Corporate Credit Conditions

This theme measures the health of the US corporate bond market from two angles: a market-distress index published by the New York Fed, and the high-quality corporate yield curve published by the US Treasury through FRED. Together they show whether corporate credit is functioning normally and what investment-grade issuers are paying to borrow across maturities.

Corporate Bond Market Distress Index (CMDI)

The Corporate Bond Market Distress Index from the New York Fed summarises stress in the US corporate bond market on a scale from 0 to 1, where higher values indicate greater distress. Three series are returned per week: the whole-market index, the investment-grade sub-index, and the high-yield sub-index. The series is published weekly.

https://eodhd.com/api/credit-risk/corporate/cmdi?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Pagination by page[offset] and page[limit]. Response is a JSON envelope with data, meta, and links.

ParameterRequiredDescription
api_tokenYesYour EODHD API token
filter[from]NoStart date, YYYY-MM-DD, inclusive
filter[to]NoEnd date, YYYY-MM-DD, inclusive, on or after filter[from]
page[limit]NoRows per page, 1 to 100, default 20
page[offset]NoRows to skip, default 0
https://eodhd.com/api/credit-risk/corporate/cmdi?api_token=YOUR_TOKEN&filter[from]=2026-01-01&filter[to]=2026-06-01
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/corporate/cmdi?api_token=YOUR_TOKEN&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/corporate/cmdi?api_token=YOUR_TOKEN&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/corporate/cmdi?api_token=YOUR_TOKEN&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/corporate/cmdi?api_token=YOUR_TOKEN&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "as_of_date": "2026-06-19T00:00:00+00:00",
      "market_cmdi": 0.13,
      "ig_cmdi": 0.23,
      "hy_cmdi": 0.06,
      "source": "ny_fed"
    }
  ],
  "meta": {
    "total": 1120,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "corporate_bond_market_distress_index",
    "source": "ny_fed",
    "frequency": "weekly",
    "attribution": "© Federal Reserve Bank of New York. Content from the New York Fed subject to the Terms of Use at newyorkfed.org."
  },
  "links": { "next": "https://eodhd.com/api/credit-risk/corporate/cmdi?page[offset]=20&page[limit]=20" }
}
FieldTypeDescription
as_of_datestring (date-time)Observation week
market_cmdinumberWhole-market distress index, 0 to 1
ig_cmdinumberInvestment-grade sub-index, 0 to 1
hy_cmdinumberHigh-yield sub-index, 0 to 1
sourcestringUpstream provider, ny_fed

HQM Corporate Yield Curve

The High Quality Market corporate bond yield curve, published by the US Treasury and distributed through FRED, gives par yields and spot rates for AAA-to-A rated US corporate bonds across the maturity spectrum. Yields are in percent and the series is published monthly. Available maturities are 1, 2, 3, 5, 7, 10, 15, 20, 25, and 30 years, each in a par and a spot variant.

https://eodhd.com/api/credit-risk/corporate/hqm-yields?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Pagination by page[offset] and page[limit]. Response is a JSON envelope with data, meta, and links.

ParameterRequiredDescription
api_tokenYesYour EODHD API token
filter[tenor]NoOne or more maturities in years: 1, 2, 3, 5, 7, 10, 15, 20, 25, 30
filter[type]NoYield type: par or spot
filter[from]NoStart date, YYYY-MM-DD, inclusive
filter[to]NoEnd date, YYYY-MM-DD, inclusive, on or after filter[from]
page[limit]NoRows per page, 1 to 100, default 20
page[offset]NoRows to skip, default 0
https://eodhd.com/api/credit-risk/corporate/hqm-yields?api_token=YOUR_TOKEN&filter[tenor]=2,5,10&filter[type]=par&filter[from]=2026-01-01&filter[to]=2026-06-01
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/corporate/hqm-yields?api_token=YOUR_TOKEN&filter[tenor]=2,5,10&filter[type]=par&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/corporate/hqm-yields?api_token=YOUR_TOKEN&filter[tenor]=2,5,10&filter[type]=par&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/corporate/hqm-yields?api_token=YOUR_TOKEN&filter[tenor]=2,5,10&filter[type]=par&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/corporate/hqm-yields?api_token=YOUR_TOKEN&filter[tenor]=2,5,10&filter[type]=par&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "series_id": "HQMCB2YRP",
      "tenor_years": 2,
      "yield_type": "par",
      "as_of_date": "2026-05-01T00:00:00+00:00",
      "yield_value": 4.37,
      "source": "fred"
    }
  ],
  "meta": {
    "total": 7126,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "hqm_corporate_yield_curve",
    "source": "fred",
    "frequency": "monthly",
    "attribution": "U.S. Department of the Treasury, HQM Corporate Bond Yield Curve, retrieved from FRED, Federal Reserve Bank of St. Louis (public domain)."
  },
  "links": { "next": "https://eodhd.com/api/credit-risk/corporate/hqm-yields?page[offset]=20&page[limit]=20" }
}
FieldTypeDescription
series_idstringFRED series identifier
tenor_yearsnumberMaturity in years
yield_typestringpar or spot
as_of_datestring (date-time)Observation month
yield_valuenumberYield in percent
sourcestringUpstream provider, fred

CDS Market Aggregates

This endpoint exposes aggregate credit-default-swap market activity from the CFTC Weekly Swaps Report. Notional volumes are reported in millions of US dollars and broken down by credit grade or by cleared status, across geographic regions. The data is published weekly with a lag of about seventeen days after the reference week.

https://eodhd.com/api/credit-risk/cds-market/aggregates?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Pagination by page[offset] and page[limit]. Response is a JSON envelope with data, meta, and links.

ParameterRequiredDescription
api_tokenYesYour EODHD API token
filter[metric]NoVolume metric. Currently gross_notional
filter[dimension]NoBreakdown dimension: grade or cleared_status
filter[from]NoStart date, YYYY-MM-DD, inclusive
filter[to]NoEnd date, YYYY-MM-DD, inclusive, on or after filter[from]
page[limit]NoRows per page, 1 to 100, default 20
page[offset]NoRows to skip, default 0
https://eodhd.com/api/credit-risk/cds-market/aggregates?api_token=YOUR_TOKEN&filter[metric]=gross_notional&filter[dimension]=grade&filter[from]=2026-01-01&filter[to]=2026-06-01
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/cds-market/aggregates?api_token=YOUR_TOKEN&filter[metric]=gross_notional&filter[dimension]=grade&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/cds-market/aggregates?api_token=YOUR_TOKEN&filter[metric]=gross_notional&filter[dimension]=grade&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/cds-market/aggregates?api_token=YOUR_TOKEN&filter[metric]=gross_notional&filter[dimension]=grade&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/cds-market/aggregates?api_token=YOUR_TOKEN&filter[metric]=gross_notional&filter[dimension]=grade&filter[from]=2026-01-01&filter[to]=2026-06-01&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "as_of_date": "2026-06-12T00:00:00+00:00",
      "release_date": "2026-06-29T00:00:00+00:00",
      "metric": "gross_notional",
      "breakdown_dimension": "cleared_status",
      "breakdown_value": "Cleared",
      "region": "North America",
      "usd_notional_mn": 1986548,
      "source": "cftc"
    }
  ],
  "meta": {
    "total": 75,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "cds_market_aggregates",
    "source": "cftc",
    "frequency": "weekly",
    "attribution": "Source: CFTC Weekly Swaps Report (public domain). Values in millions USD. Lag: T+17 days."
  },
  "links": { "next": "https://eodhd.com/api/credit-risk/cds-market/aggregates?page[offset]=20&page[limit]=20" }
}
FieldTypeDescription
as_of_datestring (date-time)Reference week
release_datestring (date-time)Date the CFTC published the figure
metricstringVolume metric, gross_notional
breakdown_dimensionstringgrade or cleared_status
breakdown_valuestringThe value within the breakdown dimension
regionstringAsia, Europe, North America, Other Regions, or TOTAL
usd_notional_mnnumberNotional volume in millions of USD
sourcestringUpstream provider, cftc

Sovereign Risk

The sovereign theme covers country-level credit risk, built on the annually updated Damodaran dataset at NYU Stern. Four endpoints cover 157 countries: risk premiums, credit ratings, CDS spreads, and a rating-to-default-spread lookup table. These are annual snapshots. Use filter[as_of] to pick a specific yearly snapshot; the latest is returned by default.

Sovereign Risk Premium

Country risk premium, equity risk premium, adjusted default spread, the corporate tax rate, and the sovereign CDS level where available, per country. All spread and premium values are decimal fractions, so 0.028 means 2.8 percent.

https://eodhd.com/api/credit-risk/sovereign/risk-premium?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Pagination by page[offset] and page[limit]. Response is a JSON envelope with data, meta, and links.

ParameterRequiredDescription
api_tokenYesYour EODHD API token
filter[country]NoCountry by ISO 3166 alpha-3 code, for example USA, or by name
filter[region]NoRestrict to a Damodaran region, for example Europe
filter[as_of]NoSnapshot date, YYYY-MM-DD
page[limit]NoRows per page, 1 to 100, default 20
page[offset]NoRows to skip, default 0
https://eodhd.com/api/credit-risk/sovereign/risk-premium?api_token=YOUR_TOKEN&filter[country]=USA
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/sovereign/risk-premium?api_token=YOUR_TOKEN&filter[country]=USA&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/sovereign/risk-premium?api_token=YOUR_TOKEN&filter[country]=USA&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/sovereign/risk-premium?api_token=YOUR_TOKEN&filter[country]=USA&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/sovereign/risk-premium?api_token=YOUR_TOKEN&filter[country]=USA&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "country_iso3": "USA",
      "country_name": "United States",
      "as_of_date": "2026-01-01T00:00:00+00:00",
      "moodys_rating": "Aa1",
      "adj_default_spread": 0.002334,
      "country_risk_premium": 0.002334,
      "equity_risk_premium": 0.0446,
      "corporate_tax_rate": 0.25,
      "sovereign_cds": 0.004,
      "source": "damodaran"
    }
  ],
  "meta": {
    "total": 157,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "sovereign_risk_premium",
    "source": "damodaran",
    "frequency": "annual",
    "attribution": "Damodaran, NYU Stern (annual). Source: https://pages.stern.nyu.edu/~adamodar/"
  },
  "links": { "next": "https://eodhd.com/api/credit-risk/sovereign/risk-premium?page[offset]=20&page[limit]=20" }
}
FieldTypeDescription
country_iso3stringISO 3166 alpha-3 country code
country_namestringCountry name
as_of_datestring (date-time)Snapshot date of the annual dataset
moodys_ratingstringMoody’s local-currency rating
adj_default_spreadnumberAdjusted default spread, decimal fraction
country_risk_premiumnumberCountry risk premium, decimal fraction
equity_risk_premiumnumberTotal equity risk premium, decimal fraction
corporate_tax_ratenumberMarginal corporate tax rate, decimal fraction
sovereign_cdsnumber or nullSovereign CDS level, decimal fraction, null where no liquid market
sourcestringUpstream provider, damodaran

Sovereign Credit Ratings

Moody’s, S&P, and Fitch local-currency ratings per country, as compiled in the annual Damodaran dataset.

https://eodhd.com/api/credit-risk/sovereign/credit-ratings?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Filters filter[country] and filter[as_of]. Response is a JSON envelope with data, meta, and links.

https://eodhd.com/api/credit-risk/sovereign/credit-ratings?api_token=YOUR_TOKEN&filter[country]=Germany
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/sovereign/credit-ratings?api_token=YOUR_TOKEN&filter[country]=Germany&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/sovereign/credit-ratings?api_token=YOUR_TOKEN&filter[country]=Germany&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/sovereign/credit-ratings?api_token=YOUR_TOKEN&filter[country]=Germany&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/sovereign/credit-ratings?api_token=YOUR_TOKEN&filter[country]=Germany&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "country_iso3": "DEU",
      "country_name": "Germany",
      "as_of_date": "2026-01-01T00:00:00+00:00",
      "moodys_rating": "Aaa",
      "sp_rating": "AAA",
      "fitch_rating": "AAA",
      "source": "damodaran"
    }
  ],
  "meta": {
    "total": 157,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "sovereign_credit_rating",
    "source": "damodaran",
    "frequency": "annual",
    "attribution": "Damodaran, NYU Stern (annual, sourced from Moody's, S&P, Fitch)."
  },
  "links": { "next": "https://eodhd.com/api/credit-risk/sovereign/credit-ratings?page[offset]=20&page[limit]=20" }
}
FieldTypeDescription
country_iso3stringISO 3166 alpha-3 country code
country_namestringCountry name
as_of_datestring (date-time)Snapshot date of the annual dataset
moodys_ratingstringMoody’s rating
sp_ratingstringS&P rating
fitch_ratingstringFitch rating
sourcestringUpstream provider, damodaran

Sovereign CDS Spreads

Sovereign 10-year CDS spreads per country, plus a variant net of Switzerland, as decimal fractions. The value is null where there is no liquid sovereign CDS market for that country.

https://eodhd.com/api/credit-risk/sovereign/cds-spreads?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Filters filter[country] and filter[as_of]. Response is a JSON envelope with data, meta, and links.

https://eodhd.com/api/credit-risk/sovereign/cds-spreads?api_token=YOUR_TOKEN&filter[country]=France
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/sovereign/cds-spreads?api_token=YOUR_TOKEN&filter[country]=France&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/sovereign/cds-spreads?api_token=YOUR_TOKEN&filter[country]=France&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/sovereign/cds-spreads?api_token=YOUR_TOKEN&filter[country]=France&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/sovereign/cds-spreads?api_token=YOUR_TOKEN&filter[country]=France&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "country_iso3": "FRA",
      "country_name": "France",
      "as_of_date": "2026-01-01T00:00:00+00:00",
      "moodys_rating": "Aa3",
      "cds_spread": 0.0035,
      "cds_spread_net_of_switzerland": 0.0028,
      "source": "damodaran"
    }
  ],
  "meta": {
    "total": 157,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "sovereign_cds_spread",
    "source": "damodaran",
    "frequency": "annual",
    "attribution": "Damodaran, NYU Stern (annual). Sovereign 10Y CDS spreads where the market is liquid; NULL where no liquid market."
  },
  "links": { "next": "https://eodhd.com/api/credit-risk/sovereign/cds-spreads?page[offset]=20&page[limit]=20" }
}
FieldTypeDescription
country_iso3stringISO 3166 alpha-3 country code
country_namestringCountry name
as_of_datestring (date-time)Snapshot date of the annual dataset
moodys_ratingstringMoody’s rating
cds_spreadnumber or nullSovereign 10Y CDS spread, decimal fraction, null where illiquid
cds_spread_net_of_switzerlandnumber or nullCDS spread net of Switzerland, decimal fraction
sourcestringUpstream provider, damodaran

Rating Default Spreads

A lookup table mapping each Moody’s rating notch to a default spread, as a decimal fraction. Values are normalised from basis points, so 60 basis points is returned as 0.006. Twenty rating buckets are covered, from Aaa to Ca.

https://eodhd.com/api/credit-risk/sovereign/default-spreads?api_token=YOUR_TOKEN

Method GET. Authentication by api_token. Cost one API call per request. Filters filter[rating] and filter[as_of]. Response is a JSON envelope with data, meta, and links.

https://eodhd.com/api/credit-risk/sovereign/default-spreads?api_token=YOUR_TOKEN&filter[rating]=Aaa
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/credit-risk/sovereign/default-spreads?api_token=YOUR_TOKEN&filter[rating]=Aaa&fmt=json"
(Sign up for free to get an API token)
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/credit-risk/sovereign/default-spreads?api_token=YOUR_TOKEN&filter[rating]=Aaa&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
(Sign up for free to get an API token)
import requests

url = f'https://eodhd.com/api/credit-risk/sovereign/default-spreads?api_token=YOUR_TOKEN&filter[rating]=Aaa&fmt=json'
data = requests.get(url).json()

print(data)
(Sign up for free to get an API token)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/credit-risk/sovereign/default-spreads?api_token=YOUR_TOKEN&filter[rating]=Aaa&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
(Sign up for free to get an API token)
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Don’t forget to replace the API token with your own.

Try it now (it's free)!

How to use it (YouTube)
{
  "data": [
    {
      "rating": "A1",
      "as_of_date": "2026-01-01T00:00:00+00:00",
      "default_spread": 0.005993,
      "source": "damodaran"
    }
  ],
  "meta": {
    "total": 20,
    "page": { "offset": 0, "limit": 20 },
    "dataset": "rating_default_spread",
    "source": "damodaran",
    "frequency": "annual",
    "attribution": "Damodaran, NYU Stern (annual). Rating-to-default-spread lookup table; values normalised from basis points to fractions (e.g. 60bp -> 0.006)."
  },
  "links": []
}
FieldTypeDescription
ratingstringMoody’s rating notch, Aaa to Ca
as_of_datestring (date-time)Snapshot date of the annual dataset
default_spreadnumberDefault spread for the rating, decimal fraction
sourcestringUpstream provider, damodaran

Funding Stress

Credit-market funding-stress indicators are planned as a second wave of this API, coming Q3 2026. In the meantime, US money-market funding-stress spreads — such as EFFR minus SOFR and SOFR relative to the Federal Reserve target range — are already available today through the EODHD Interest Rates API at https://eodhd.com/financial-apis/us-treasury-ust-interest-rates-api-beta.

Coverage, Frequency, and Lag

DatasetEndpointSourceFrequencyCoverage
Corporate bond market distress indexcorporate/cmdiNY FedWeeklyMarket, investment-grade, high-yield
HQM corporate yield curvecorporate/hqm-yieldsUS Treasury via FREDMonthlyTenors 1 to 30 years, par and spot
CDS market aggregatescds-market/aggregatesCFTC Weekly Swaps ReportWeekly, T+17 daysBy grade and cleared status, five regions
Sovereign risk premiumsovereign/risk-premiumDamodaran, NYU SternAnnual157 countries
Sovereign credit ratingssovereign/credit-ratingsDamodaran, NYU SternAnnual157 countries
Sovereign CDS spreadssovereign/cds-spreadsDamodaran, NYU SternAnnual157 countries, liquid markets
Rating default spreadssovereign/default-spreadsDamodaran, NYU SternAnnual20 rating buckets

Endpoint Reference

EndpointDescription
/api/credit-risk/corporate/cmdiNY Fed corporate bond market distress index, weekly
/api/credit-risk/corporate/hqm-yieldsHQM corporate yield curve, par and spot, monthly
/api/credit-risk/cds-market/aggregatesCFTC CDS market notional aggregates, weekly
/api/credit-risk/sovereign/risk-premiumCountry and equity risk premiums, tax rate, sovereign CDS
/api/credit-risk/sovereign/credit-ratingsMoody’s, S&P, and Fitch sovereign ratings
/api/credit-risk/sovereign/cds-spreadsSovereign 10Y CDS spreads
/api/credit-risk/sovereign/default-spreadsRating-to-default-spread lookup table

Response Codes

CodeMeaning
200Success. Response body carries data, meta, and links
401Missing or invalid api_token
403Token is valid but the plan does not include access to these endpoints
422Invalid parameter — malformed date, page[limit] above 100, end date before start date, an out-of-range filter value, or a filter key that does not belong to the endpoint

Attribution and Licensing

Every response carries the required attribution string for its source in the meta.attribution field. When redistributing or displaying this data, reproduce the attribution for the relevant source as shown below.

SourceRequired attribution
NY Fed CMDI© Federal Reserve Bank of New York. Content from the New York Fed subject to the Terms of Use at newyorkfed.org.
HQM via FREDU.S. Department of the Treasury, HQM Corporate Bond Yield Curve, retrieved from FRED, Federal Reserve Bank of St. Louis
CFTCSource: CFTC Weekly Swaps Report
DamodaranDamodaran, NYU Stern (annual). Source: https://pages.stern.nyu.edu/~adamodar/

Methodology and Limitations

  • Units differ by dataset. Sovereign risk premiums, default spreads, CDS spreads, and tax rates are decimal fractions, so 0.006 means 60 basis points or 0.6 percent. The CMDI is an index between 0 and 1. HQM yields are in percent. CDS market aggregates are notional volumes in millions of US dollars in the usd_notional_mn field.
  • The four sovereign datasets are annual snapshots from the Damodaran dataset. Use filter[as_of] with a date to select a specific yearly snapshot; the most recent snapshot is returned by default.
  • Sovereign CDS values are null for countries without a liquid sovereign CDS market, rather than zero.
  • CDS market aggregates currently expose the gross_notional metric, broken down by grade or by cleared_status across five regions, and are published weekly by the CFTC with a lag of about seventeen days after the reference week.
  • The HQM corporate yield curve is monthly. Available maturities are 1, 2, 3, 5, 7, 10, 15, 20, 25, and 30 years, each in a par and a spot variant.
  • Filter keys are endpoint-specific. Passing a filter key that does not belong to an endpoint, an out-of-range value, or a malformed date returns 422.

Sign up & Get Data

Chat