/v1/yield
Yield to maturity
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/bond-api/v1/yield" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bond-api/v1/yield", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bond-api/v1/yield");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/bond-api/v1/yield",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"note": "YTM is the annualised discount rate that makes the present value of the cash flows equal the price (by bisection).",
"inputs": {
"price": 925.61,
"frequency": 2,
"face_value": 1000,
"maturity_years": 10,
"coupon_rate_pct": 5
},
"current_yield_pct": 5.401843,
"yield_to_maturity_pct": 6.000037
},
"meta": {
"timestamp": "2026-06-05T03:09:00.416Z",
"request_id": "f95d1ef4-0352-4034-a78e-8ba7e3b5e7b8"
},
"status": "ok",
"message": "Yield to maturity",
"success": true
}