Resolve Bond
curl --request GET \
--url https://api.debtstack.ai/v1/bonds/resolveimport requests
url = "https://api.debtstack.ai/v1/bonds/resolve"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.debtstack.ai/v1/bonds/resolve', 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.debtstack.ai/v1/bonds/resolve",
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.debtstack.ai/v1/bonds/resolve"
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.debtstack.ai/v1/bonds/resolve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debtstack.ai/v1/bonds/resolve")
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": {
"query": "<string>",
"matches": [
{}
],
"exact_match": true,
"suggestions": [
{}
]
}
}Bonds
Resolve Bond
Map between bond identifiers and descriptions
GET
/
v1
/
bonds
/
resolve
Resolve Bond
curl --request GET \
--url https://api.debtstack.ai/v1/bonds/resolveimport requests
url = "https://api.debtstack.ai/v1/bonds/resolve"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.debtstack.ai/v1/bonds/resolve', 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.debtstack.ai/v1/bonds/resolve",
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.debtstack.ai/v1/bonds/resolve"
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.debtstack.ai/v1/bonds/resolve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debtstack.ai/v1/bonds/resolve")
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": {
"query": "<string>",
"matches": [
{}
],
"exact_match": true,
"suggestions": [
{}
]
}
}Overview
Resolve bond identifiers (CUSIP, ISIN) or free-text descriptions to structured bond data. Useful for looking up bonds by CUSIP or matching user queries to specific instruments.Request
string
Free-text search query.Example:
RIG 8% 2027string
Exact CUSIP lookup.Example:
893830AK8string
Exact ISIN lookup.Example:
US893830AK85string
Filter by company ticker.Example:
RIGnumber
Filter by coupon rate (%).Example:
8.0integer
Filter by maturity year.Example:
2027string
default:"fuzzy"
Match mode:
exact or fuzzyinteger
default:"5"
Maximum number of matches.
Response
object
Examples
Free-Text Query
curl "https://api.debtstack.ai/v1/bonds/resolve?q=RIG%208%25%202027" \
-H "X-API-Key: ds_xxxxx"
import requests
response = requests.get(
"https://api.debtstack.ai/v1/bonds/resolve",
params={"q": "RIG 8% 2027"},
headers={"X-API-Key": "ds_xxxxx"}
)
match = response.json()["data"]["matches"][0]
print(f"CUSIP: {match['bond']['cusip']}")
print(f"Name: {match['bond']['name']}")
Response
{
"data": {
"query": "RIG 8% 2027",
"matches": [
{
"confidence": 0.95,
"bond": {
"id": "uuid-123",
"name": "8.00% Senior Notes due 2027",
"cusip": "893830AK8",
"isin": "US893830AK85",
"company_ticker": "RIG",
"company_name": "Transocean Ltd.",
"coupon_rate": 8.0,
"maturity_date": "2027-02-01",
"seniority": "senior_unsecured",
"outstanding": 68810000000
}
}
],
"exact_match": false,
"suggestions": []
}
}
CUSIP Lookup
curl "https://api.debtstack.ai/v1/bonds/resolve?cusip=893830AK8" \
-H "X-API-Key: ds_xxxxx"
{
"data": {
"query": "893830AK8",
"matches": [
{
"confidence": 1.0,
"bond": {
"id": "uuid-123",
"name": "8.00% Senior Notes due 2027",
"cusip": "893830AK8",
"isin": "US893830AK85",
"company_ticker": "RIG",
"company_name": "Transocean Ltd.",
"coupon_rate": 8.0,
"maturity_date": "2027-02-01",
"seniority": "senior_unsecured",
"issuer": {
"name": "Transocean International Limited",
"entity_type": "finco"
},
"guarantor_count": 5,
"outstanding": 68810000000
}
}
],
"exact_match": true
}
}
Handling Fuzzy Matches
When the query is ambiguous, multiple matches may be returned:curl "https://api.debtstack.ai/v1/bonds/resolve?q=AAPL%205%25" \
-H "X-API-Key: ds_xxxxx"
{
"data": {
"query": "AAPL 5%",
"matches": [
{
"confidence": 0.85,
"bond": {
"name": "4.65% Notes due 2046",
"cusip": "037833CP8",
"coupon_rate": 4.65,
"maturity_date": "2046-02-23"
}
},
{
"confidence": 0.80,
"bond": {
"name": "4.50% Notes due 2036",
"cusip": "037833CQ6",
"coupon_rate": 4.50,
"maturity_date": "2036-02-23"
}
}
],
"exact_match": false,
"suggestions": [
"Be more specific with maturity year"
]
}
}
Use Cases
Map User Input to CUSIP
def get_cusip(query):
"""Convert user query to CUSIP."""
response = requests.get(
f"{BASE_URL}/bonds/resolve",
params={"q": query, "limit": 1},
headers={"X-API-Key": API_KEY}
)
matches = response.json()["data"]["matches"]
if matches and matches[0]["confidence"] > 0.8:
return matches[0]["bond"]["cusip"]
return None
# Usage
cusip = get_cusip("RIG 8% 2027")
print(cusip) # "893830AK8"
Validate CUSIP
def validate_cusip(cusip):
"""Check if CUSIP exists in database."""
response = requests.get(
f"{BASE_URL}/bonds/resolve",
params={"cusip": cusip},
headers={"X-API-Key": API_KEY}
)
return response.json()["data"]["exact_match"]
# Usage
is_valid = validate_cusip("893830AK8")
print(is_valid) # True

