from datetime import date
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCE_DEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCE_DEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.economy.get_treasury_yields(date_=date.fromisoformat("2024-01-15"), dates="2024-01-15,2024-01-16", date_from=date.fromisoformat("2024-01-01"), date_to=date.fromisoformat("2024-01-31"), date_after=date.fromisoformat("2024-01-01"), date_before=date.fromisoformat("2024-01-31"), limit=100)
while res is not None:
# Handle items
res = res.next()curl --request GET \
--url https://api.aries.com/v1/economy/treasury-yields \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/economy/treasury-yields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/economy/treasury-yields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/economy/treasury-yields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/economy/treasury-yields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/economy/treasury-yields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"nextUrl": "https://api.aries.com/v1/economy/treasury-yields?next=...",
"requestId": "0cacd52605954a20afa995624faa46b9",
"results": [
{
"date": "2025-12-22",
"yield10Year": 4.17,
"yield1Month": 3.72,
"yield1Year": 3.53,
"yield2Year": 3.44,
"yield30Year": 4.84,
"yield3Month": 3.64,
"yield5Year": 3.71
}
],
"status": "OK"
}Latest Treasury Yields
Retrieve current U.S. Treasury bond yields across various maturities from 1-month to 30-year bonds. Monitor risk-free rates and yield curve dynamics.
Use Case: Plot the yield curve to identify potential economic recessions indicated by inversions.
from datetime import date
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCE_DEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCE_DEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.economy.get_treasury_yields(date_=date.fromisoformat("2024-01-15"), dates="2024-01-15,2024-01-16", date_from=date.fromisoformat("2024-01-01"), date_to=date.fromisoformat("2024-01-31"), date_after=date.fromisoformat("2024-01-01"), date_before=date.fromisoformat("2024-01-31"), limit=100)
while res is not None:
# Handle items
res = res.next()curl --request GET \
--url https://api.aries.com/v1/economy/treasury-yields \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/economy/treasury-yields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/economy/treasury-yields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/economy/treasury-yields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/economy/treasury-yields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/economy/treasury-yields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"nextUrl": "https://api.aries.com/v1/economy/treasury-yields?next=...",
"requestId": "0cacd52605954a20afa995624faa46b9",
"results": [
{
"date": "2025-12-22",
"yield10Year": 4.17,
"yield1Month": 3.72,
"yield1Year": 3.53,
"yield2Year": 3.44,
"yield30Year": 4.84,
"yield3Month": 3.64,
"yield5Year": 3.71
}
],
"status": "OK"
}Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Query Parameters
Exact date in YYYY-MM-DD format. Use this when you want one specific calendar day.
"2024-01-15"
Comma-separated list of dates in YYYY-MM-DD format. Use this when you want several specific dates in one request.
"2024-01-15,2024-01-16"
Start-date filter. Returns records on or after this date.
"2024-01-01"
End-date filter. Returns records on or before this date.
"2024-01-31"
After-date filter. Returns records after this date, excluding the date itself.
"2024-01-01"
Before-date filter. Returns records before this date, excluding the date itself.
"2024-01-31"
Maximum number of results to return. Use smaller values for UI pages and larger values for exports within API limits.
100
A comma-separated list of sort columns. For each column, append .asc or .desc to specify direction. Massive documents this family with date-based sorting; use provider-supported column names in the text box.
Pagination cursor from the previous response. Omit it on the first request, then send the returned cursor to fetch the next page.
Response
Successful response
U.S. Treasury yield curve observations by maturity for each reference date, sourced from Polygon.
URL for next page of results
Request identifier returned by the upstream data provider
Daily treasury yield observations from the upstream provider
Show child attributes
Show child attributes
Status string from the upstream data provider — typically OK for a successful response. Treat any other value as an error indicator alongside the HTTP status code.
Was this page helpful?