MCP Server For Financial Data by EODHD Learn more

US Treasury (UST) Interest Rates API (beta)

In plans: All plans.
1 call per request. ?
Resources: Coding Libraries

This API provides structured, user-friendly access to official US Treasury interest rate datasets (Treasury bills, par yield curve rates, long-term rates, and real yield curve rates). These time series are widely used for macro research, fixed-income analytics, discounting/cost of capital, yield curve modeling, and building risk-free rate baselines in trading/portfolio systems. This API includes four base endpoints: Bill Rates, Long-Term Rates, Yield Rates, Real Yield Rates.

1. US Treasury Bill Rates

Endpoint

https://eodhd.com/api/ust/bill-rates

Description

Provides Daily Treasury Bill Rates (T-Bills): discount and coupon rates, average rates, maturity, and CUSIP.

Request Example

https://eodhd.com/api/ust/bill-rates?api_token=YOUR_TOKEN&filter[year]=2012&page[limit]=100&page[offset]=0
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/ust/bill-rates?api_token=YOUR_TOKEN&filter[year]=2012&page[limit]=100&page[offset]=0&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/ust/bill-rates?api_token=YOUR_TOKEN&filter[year]=2012&page[limit]=100&page[offset]=0&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/ust/bill-rates?api_token=YOUR_TOKEN&filter[year]=2012&page[limit]=100&page[offset]=0&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/ust/bill-rates?api_token=YOUR_TOKEN&filter[year]=2012&page[limit]=100&page[offset]=0&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)

Parameters

ParameterRequiredTypeDescriptionExample
api_tokenYesstringYour API access tokenapi_token=YOUR_TOKEN
filter[year]NointegerFilter by year (1900 – current year + 1). If not mentioned – current year.filter[year]=2012

Output fields (JSON)

FieldTypeDescription
datestring (YYYY-MM-DD)Observation date
tenorstringBill tenor (e.g., 4WK, 13WK)
discountnumberDiscount rate
couponnumberCoupon equivalent rate
avg_discountnumberAverage discount rate
avg_couponnumberAverage coupon equivalent rate
maturity_datestring (YYYY-MM-DD)Maturity date
cusipstringCUSIP identifier

Response Example

{
  "meta": {
    "total": 120
  },
  "data": [
    {
      "date": "2026-01-02",
      "tenor": "4WK",
      "discount": 3.58,
      "coupon": 3.64,
      "avg_discount": 3.58,
      "avg_coupon": 3.64,
      "maturity_date": "2026-02-03",
      "cusip": "912797SJ7"
    },
    {
      "date": "2026-01-02",
      "tenor": "8WK",
      "discount": 3.57,
      "coupon": 3.64,
      "avg_discount": 3.57,
      "avg_coupon": 3.64,
      "maturity_date": "2026-03-03",
      "cusip": "912797ST5"
    },
    {
      "date": "2026-01-02",
      "tenor": "13WK",
      "discount": 3.54,
      "coupon": 3.62,
      "avg_discount": 3.54,
      "avg_coupon": 3.62,
      "maturity_date": "2026-04-02",
      "cusip": "912797SD0"
    },
    {
      "date": "2026-01-02",
      "tenor": "17WK",
      "discount": 3.54,
      "coupon": 3.63,
      "avg_discount": 3.54,
      "avg_coupon": 3.63,
      "maturity_date": "2026-05-05",
      "cusip": "912797TL1"
    },
......

2. US Treasury Long-Term Rates

Endpoint

https://eodhd.com/api/ust/long-term-rates

Description

Long-term Treasury rates. This feed combines “Daily Treasury Real Long-Term Rate Averages” and “Daily Treasury Long-Term Rates” into one dataset.

Request Example

https://eodhd.com/api/ust/long-term-rates?api_token=YOUR_TOKEN&filter[year]=2020
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/ust/long-term-rates?api_token=YOUR_TOKEN&filter[year]=2020&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/ust/long-term-rates?api_token=YOUR_TOKEN&filter[year]=2020&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/ust/long-term-rates?api_token=YOUR_TOKEN&filter[year]=2020&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/ust/long-term-rates?api_token=YOUR_TOKEN&filter[year]=2020&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)

Parameters

ParameterRequiredTypeDescriptionExample
api_tokenYesstringYour API access tokenapi_token=YOUR_TOKEN
filter[year]NointegerFilter by year (1900 – current year + 1). If not mentioned – current year.filter[year]=2012

Output fields (JSON)

FieldTypeDescription
datestring (YYYY-MM-DD)Observation date
rate_typestringRate series identifier (examples include BC_20year, Over_10_Years, Real_Rate)
ratenumberRate value
extrapolation_factornumber or nullExtrapolation factor where applicable

Response Example

{
  "meta": {
    "total": 60
  },
  "data": [
    {
      "date": "2026-01-02",
      "rate_type": "BC_20year",
      "rate": 4.81,
      "extrapolation_factor": null
    },
    {
      "date": "2026-01-02",
      "rate_type": "Over_10_Years",
      "rate": 4.78,
      "extrapolation_factor": null
    },
    {
      "date": "2026-01-02",
      "rate_type": "Real_Rate",
      "rate": 2.55,
      "extrapolation_factor": null
    },
    {
      "date": "2026-01-05",
      "rate_type": "BC_20year",
      "rate": 4.79,
      "extrapolation_factor": null
    },
    {
      "date": "2026-01-05",
      "rate_type": "Over_10_Years",
      "rate": 4.76,
      "extrapolation_factor": null
    },
    {
      "date": "2026-01-05",
      "rate_type": "Real_Rate",
      "rate": 2.53,
      "extrapolation_factor": null
.......

3. US Treasury Yield Rates API (Par Yield Curve)

Endpoint

https://eodhd.com/api/ust/yield-rates

Description

Daily Treasury Par Yield Curve Rates (nominal yield curve by tenor).

Request Example

https://eodhd.com/api/ust/yield-rates?api_token=YOUR_TOKEN&filter[year]=2023
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/ust/yield-rates?api_token=YOUR_TOKEN&filter[year]=2023&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/ust/yield-rates?api_token=YOUR_TOKEN&filter[year]=2023&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/ust/yield-rates?api_token=YOUR_TOKEN&filter[year]=2023&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/ust/yield-rates?api_token=YOUR_TOKEN&filter[year]=2023&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)

Parameters

ParameterRequiredTypeDescriptionExample
api_tokenYesstringYour API access tokenapi_token=YOUR_TOKEN
filter[year]NointegerFilter by year (1900 – current year + 1). If not mentioned – current year.filter[year]=2023

Output fields (JSON)

FieldTypeDescription
datestring (YYYY-MM-DD)Observation date
tenorstringTenor (e.g., 1M, 6M, 2Y, 10Y)
ratenumberPar yield for the given tenor

Response Example

{
  "meta": {
    "total": 280
  },
  "data": [
    {
      "date": "2026-01-02",
      "tenor": "1M",
      "rate": 3.72
    },
    {
      "date": "2026-01-02",
      "tenor": "1.5M",
      "rate": 3.71
    },
    {
      "date": "2026-01-02",
      "tenor": "2M",
      "rate": 3.66
    },
    {
      "date": "2026-01-02",
      "tenor": "3M",
      "rate": 3.65
    },
    {
      "date": "2026-01-02",
      "tenor": "4M",
      "rate": 3.62
    },
    {
      "date": "2026-01-02",
      "tenor": "6M",
      "rate": 3.58
    },
    {
      "date": "2026-01-02",
      "tenor": "1Y",
      "rate": 3.47
......

4. US Treasury Real Yield Rates API (Par Real Yield Curve)

Endpoint

https://eodhd.com/api/ust/real-yield-rates

Description

Daily Treasury Par Real Yield Curve Rates (real yield curve by tenor).

Request Example

https://eodhd.com/api/ust/real-yield-rates?api_token=YOUR_TOKEN&filter[year]=2024
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/ust/real-yield-rates?api_token=YOUR_TOKEN&filter[year]=2024&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/ust/real-yield-rates?api_token=YOUR_TOKEN&filter[year]=2024&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/ust/real-yield-rates?api_token=YOUR_TOKEN&filter[year]=2024&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/ust/real-yield-rates?api_token=YOUR_TOKEN&filter[year]=2024&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)

Parameters

ParameterRequiredTypeDescriptionExample
api_tokenYesstringYour API access tokenapi_token=YOUR_TOKEN
filter[year]NointegerFilter by year (1900 – current year + 1). If not mentioned – current year.filter[year]=2024

Output fields (JSON)

FieldTypeDescription
datestring (YYYY-MM-DD)Observation date
tenorstringTenor (e.g., 5Y, 10Y, 30Y)
ratenumberReal yield for the given tenor

Response Example

{
  "meta": {
    "total": 100
  },
  "data": [
    {
      "date": "2026-01-02",
      "tenor": "5Y",
      "rate": 1.46
    },
    {
      "date": "2026-01-02",
      "tenor": "7Y",
      "rate": 1.69
    },
    {
      "date": "2026-01-02",
      "tenor": "10Y",
      "rate": 1.94
    },
    {
      "date": "2026-01-02",
      "tenor": "20Y",
      "rate": 2.39
    },
    {
      "date": "2026-01-02",
      "tenor": "30Y",
      "rate": 2.63
    },
    {
      "date": "2026-01-05",
      "tenor": "5Y",
      "rate": 1.42
    },
    {
      "date": "2026-01-05",
      "tenor": "7Y",
      "rate": 1.65

Chat