Overview
- Category
- Finance
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/bond-calculator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/bond-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
face_value· number · required- Enter face value for this calculation.
coupon_rate· number · required- Enter annual coupon rate for this calculation.
market_yield· number · required- Enter market yield for this calculation.
years· number · required- Enter years to maturity for this calculation.
payments_per_year· string · required-
Enter coupon frequency for this calculation. Accepted values:
1, 2, 4.
{
"type": "object",
"properties": {
"face_value": {
"type": "number",
"description": "Enter face value for this calculation.",
"minimum": 0
},
"coupon_rate": {
"type": "number",
"description": "Enter annual coupon rate for this calculation."
},
"market_yield": {
"type": "number",
"description": "Enter market yield for this calculation."
},
"years": {
"type": "number",
"description": "Enter years to maturity for this calculation.",
"minimum": 0.1000000000000000055511151231257827021181583404541015625
},
"payments_per_year": {
"type": "string",
"description": "Enter coupon frequency for this calculation.",
"enum": [
"1",
"2",
"4"
]
}
},
"required": [
"face_value",
"coupon_rate",
"market_yield",
"years",
"payments_per_year"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
bond_price· number- Estimated bond price calculated by the tool.
annual_coupon· number- Annual coupon calculated by the tool.
current_yield· number- Current yield calculated by the tool.
discount_premium· number- Discount or premium calculated by the tool.
{
"type": "object",
"properties": {
"bond_price": {
"type": "number",
"description": "Estimated bond price calculated by the tool."
},
"annual_coupon": {
"type": "number",
"description": "Annual coupon calculated by the tool."
},
"current_yield": {
"type": "number",
"description": "Current yield calculated by the tool."
},
"discount_premium": {
"type": "number",
"description": "Discount or premium calculated by the tool."
}
},
"additionalProperties": false
}
Bond Calculator worked example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/bond-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"face_value": 1000,
"coupon_rate": 5,
"market_yield": 6,
"years": 10,
"payments_per_year": "2"
}'
{
"ok": true,
"data": {
"slug": "bond-calculator",
"result": {
"values": {
"bond_price": 925.6100000000000136424205265939235687255859375,
"annual_coupon": 50,
"current_yield": 5.4018280000000000740101313567720353603363037109375,
"discount_premium": -74.3900000000000005684341886080801486968994140625
},
"display": {
"display": "925.61"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.