curl --request POST \
--url https://terrapinfinance.com/api/v1/government_yield_curve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2026-07-23",
"region": "us",
"type": "par"
}
'import requests
url = "https://terrapinfinance.com/api/v1/government_yield_curve"
payload = {
"date": "2026-07-23",
"region": "us",
"type": "par"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({date: '2026-07-23', region: 'us', type: 'par'})
};
fetch('https://terrapinfinance.com/api/v1/government_yield_curve', 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://terrapinfinance.com/api/v1/government_yield_curve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'date' => '2026-07-23',
'region' => 'us',
'type' => 'par'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://terrapinfinance.com/api/v1/government_yield_curve"
payload := strings.NewReader("{\n \"date\": \"2026-07-23\",\n \"region\": \"us\",\n \"type\": \"par\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://terrapinfinance.com/api/v1/government_yield_curve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2026-07-23\",\n \"region\": \"us\",\n \"type\": \"par\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://terrapinfinance.com/api/v1/government_yield_curve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2026-07-23\",\n \"region\": \"us\",\n \"type\": \"par\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"rate": 4.135,
"years_to_maturity": 1
},
{
"rate": 4.348,
"years_to_maturity": 2
},
{
"rate": 4.386,
"years_to_maturity": 3
},
{
"rate": 4.455,
"years_to_maturity": 5
},
{
"rate": 4.57,
"years_to_maturity": 7
},
{
"rate": 4.702,
"years_to_maturity": 10
},
{
"rate": 5.047,
"years_to_maturity": 15
},
{
"rate": 5.158,
"years_to_maturity": 30
},
{
"rate": 5.193,
"years_to_maturity": 25
},
{
"rate": 5.198,
"years_to_maturity": 20
}
],
"total": 10
}{
"errors": [
{
"detail": "Unauthorized",
"reason": "Your account tier does not allow this operation. Contact team@terrapinfinance.com for an upgrade."
}
]
}{
"errors": [
{
"detail": "Payment Required",
"reason": "You have run out of your granted quota for this resource as defined by your account tier. Contact team@terrapinfinance.com for an upgrade."
}
]
}{
"errors": [
{
"detail": "Forbidden",
"reason": "Your account tier does not allow this operation. Contact team@terrapinfinance.com for an upgrade."
}
]
}{
"errors": [
{
"detail": "Invalid string. Got: integer",
"source": {
"pointer": "/isins/0"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "Too Many Requests",
"reason": "<string>"
}
]
}{
"errors": [
{
"detail": "Internal Server Error",
"reason": "<string>"
}
]
}Government Yield Curve
Retrieve government yield curve points for a given date, region, and curve type.
Benchmark curve returns the EoD yields of the benchmark instruments, and their respective years to maturity.
Zero curve returns the zero rates (or term rates) at exact tenors. The zero curve is constructed via monotone convex bootstrapping of available EoD trades for benchmark instruments. Due to a lack of available EoD trades for very short maturity bills, the earliest tenor available starts at 1 year.
Par curve returns the par yields at exact tenors. The par curve is derived from the zero curve.
curl --request POST \
--url https://terrapinfinance.com/api/v1/government_yield_curve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2026-07-23",
"region": "us",
"type": "par"
}
'import requests
url = "https://terrapinfinance.com/api/v1/government_yield_curve"
payload = {
"date": "2026-07-23",
"region": "us",
"type": "par"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({date: '2026-07-23', region: 'us', type: 'par'})
};
fetch('https://terrapinfinance.com/api/v1/government_yield_curve', 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://terrapinfinance.com/api/v1/government_yield_curve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'date' => '2026-07-23',
'region' => 'us',
'type' => 'par'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://terrapinfinance.com/api/v1/government_yield_curve"
payload := strings.NewReader("{\n \"date\": \"2026-07-23\",\n \"region\": \"us\",\n \"type\": \"par\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://terrapinfinance.com/api/v1/government_yield_curve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2026-07-23\",\n \"region\": \"us\",\n \"type\": \"par\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://terrapinfinance.com/api/v1/government_yield_curve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2026-07-23\",\n \"region\": \"us\",\n \"type\": \"par\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"rate": 4.135,
"years_to_maturity": 1
},
{
"rate": 4.348,
"years_to_maturity": 2
},
{
"rate": 4.386,
"years_to_maturity": 3
},
{
"rate": 4.455,
"years_to_maturity": 5
},
{
"rate": 4.57,
"years_to_maturity": 7
},
{
"rate": 4.702,
"years_to_maturity": 10
},
{
"rate": 5.047,
"years_to_maturity": 15
},
{
"rate": 5.158,
"years_to_maturity": 30
},
{
"rate": 5.193,
"years_to_maturity": 25
},
{
"rate": 5.198,
"years_to_maturity": 20
}
],
"total": 10
}{
"errors": [
{
"detail": "Unauthorized",
"reason": "Your account tier does not allow this operation. Contact team@terrapinfinance.com for an upgrade."
}
]
}{
"errors": [
{
"detail": "Payment Required",
"reason": "You have run out of your granted quota for this resource as defined by your account tier. Contact team@terrapinfinance.com for an upgrade."
}
]
}{
"errors": [
{
"detail": "Forbidden",
"reason": "Your account tier does not allow this operation. Contact team@terrapinfinance.com for an upgrade."
}
]
}{
"errors": [
{
"detail": "Invalid string. Got: integer",
"source": {
"pointer": "/isins/0"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "Too Many Requests",
"reason": "<string>"
}
]
}{
"errors": [
{
"detail": "Internal Server Error",
"reason": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Curve date in ISO-8601 format (YYYY-MM-DD).
Region for which to retrieve the curve.
de, uk, us Curve type:
zero: zero curve. Lists zero rates at exact tenors.par: par yield curve. Lists par yields at exact tenors.benchmark: benchmark, or 'actives' curve. Lists benchmark instrument yields, and their exact years to maturity.
benchmark, par, zero 