Bond Pricing
curl --request GET \
--url https://api.example.com/v1/pricingimport requests
url = "https://api.example.com/v1/pricing"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/pricing', 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.example.com/v1/pricing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/pricing"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/pricing")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/pricing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"cusip": "<string>",
"bond_name": "<string>",
"last_price": 123,
"last_trade_date": "<string>",
"ytm": 123,
"spread": 123,
"staleness_days": 123
}
]
}Bonds
Bond Pricing
Get bond pricing from FINRA TRACE
GET
/
v1
/
pricing
Bond Pricing
curl --request GET \
--url https://api.example.com/v1/pricingimport requests
url = "https://api.example.com/v1/pricing"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/pricing', 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.example.com/v1/pricing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/pricing"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/pricing")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/pricing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"cusip": "<string>",
"bond_name": "<string>",
"last_price": 123,
"last_trade_date": "<string>",
"ytm": 123,
"spread": 123,
"staleness_days": 123
}
]
}Overview
Retrieve bond pricing data including last trade price, yield to maturity (YTM), and spread to treasury. Pricing data is sourced from FINRA TRACE.Bond pricing is available on Pro tier and above. Free tier users can access pricing through the
/v1/bonds endpoint with has_pricing=true.Request
Response
Examples
Current Pricing for Company
curl "https://api.debtstack.ai/v1/pricing?ticker=RIG&aggregation=latest&fields=cusip,bond_name,last_price,ytm,spread,staleness_days" \
-H "X-API-Key: ds_xxxxx"
import requests
response = requests.get(
"https://api.debtstack.ai/v1/pricing",
params={
"ticker": "RIG",
"aggregation": "latest",
"fields": "cusip,bond_name,last_price,ytm,spread"
},
headers={"X-API-Key": "ds_xxxxx"}
)
for bond in response.json()["data"]:
print(f"{bond['cusip']}: {bond['last_price']:.2f} ({bond['ytm']:.2f}% YTM)")
Response
{
"data": [
{
"cusip": "893830AK8",
"bond_name": "8.00% Senior Notes due 2027",
"last_price": 94.25,
"ytm": 9.42,
"spread": 512,
"staleness_days": 1
},
{
"cusip": "893830AL6",
"bond_name": "7.50% Senior Notes due 2031",
"last_price": 87.50,
"ytm": 9.85,
"spread": 548,
"staleness_days": 2
}
],
"meta": {
"total": 8,
"priced_count": 6,
"stale_count": 2,
"as_of": "2026-01-23T16:00:00Z"
}
}
Historical Pricing
curl "https://api.debtstack.ai/v1/pricing?cusip=893830AK8&date_from=2026-01-01&date_to=2026-01-15&aggregation=daily" \
-H "X-API-Key: ds_xxxxx"
{
"data": [
{
"date": "2026-01-15",
"cusip": "893830AK8",
"last_price": 94.25,
"ytm": 9.42,
"spread": 512
},
{
"date": "2026-01-14",
"cusip": "893830AK8",
"last_price": 94.50,
"ytm": 9.38,
"spread": 508
},
{
"date": "2026-01-13",
"cusip": "893830AK8",
"last_price": 95.00,
"ytm": 9.28,
"spread": 498
}
],
"meta": {
"total": 11
}
}
High-Yield Screen
Find bonds with YTM > 10%:curl "https://api.debtstack.ai/v1/pricing?min_ytm=10.0&sort=-ytm&limit=20" \
-H "X-API-Key: ds_xxxxx"
Use Cases
Compare Bond Yields
# Get pricing for multiple bonds
response = requests.get(
f"{BASE_URL}/pricing",
params={
"cusip": "893830AK8,893830AL6",
"fields": "cusip,bond_name,ytm,spread,maturity_date"
},
headers={"X-API-Key": API_KEY}
)
bonds = sorted(response.json()["data"], key=lambda x: x["ytm"])
print("Bonds by YTM (ascending):")
for bond in bonds:
print(f" {bond['bond_name']}: {bond['ytm']:.2f}% ({bond['spread']}bps spread)")
Track Price Changes
# Get 2-week price history
response = requests.get(
f"{BASE_URL}/pricing",
params={
"cusip": "893830AK8",
"date_from": "2026-01-09",
"date_to": "2026-01-23",
"aggregation": "daily"
},
headers={"X-API-Key": API_KEY}
)
history = response.json()["data"]
if len(history) >= 2:
first = history[-1]["last_price"]
last = history[0]["last_price"]
change = last - first
print(f"2-week price change: {change:+.2f} ({first:.2f} -> {last:.2f})")
Notes
- Pricing data is from FINRA TRACE
staleness_daysindicates how fresh the pricing is- Bonds without recent trades may not have pricing
- YTM calculations assume hold to maturity
- Spread is calculated against the interpolated treasury curve

