# Bond Price Calculator (Fixed-Coupon, Yield to Maturity)

> Bond Price Calculator (Fixed-Coupon, Yield to Maturity) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Prices a fixed-coupon bond from its yield to maturity by present-valuing coupons and face value, returning clean price, coupon per period, current yield, and premium/discount vs par.

## Facts

- Endpoint: POST https://agent402.tools/api/bond-price
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bond-price-calculator-fixed-coupon-yield-to-maturity-7c3ea6bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X-Em12jSBYk-n_75zYrpH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bond-price-calculator-fixed-coupon-yield-to-maturity-7c3ea6bc -d '<json body>'
```

Example prompt: Price a semiannual bond with a $1,000 face value, 5% annual coupon rate, 10 years to maturity, and a yield to maturity of 4% — is it trading at a premium or discount?

## When to prefer this

Use this endpoint when you need to price a standard fixed-coupon bond from its yield to maturity and want clean price, current yield, and premium/discount in a single call. Prefer this over building your own DCF when working with bonds with regular periodic coupons and a known YTM. Not suitable for floating-rate bonds, zero-coupon bonds (unless couponRate=0 is handled), or bonds with irregular cash flows.

## Known failure modes

- Missing required fields (years, faceValue, couponRate, yieldToMaturity) returns a validation error
- Negative or zero yield to maturity may produce mathematical errors or undefined results
- Extreme yield values (e.g. 0.0001 or 5.0) may produce unrealistic but technically valid prices
- Non-numeric inputs for any field will cause schema validation failure
- periodsPerYear of 0 would cause division-by-zero errors

## How this service works

Price a fixed-coupon bond from its yield to maturity: present-value the coupons plus face. Returns clean price, coupon per period, current yield, and premium/discount vs par.

## Output

Returns clean bond price (present value of all cash flows), coupon payment per period, current yield (annual coupon / price), and the premium or discount relative to par/face value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "years": {
   "type": "number",
   "description": "Years to maturity"
  },
  "faceValue": {
   "type": "number",
   "description": "Par/face value repaid at maturity"
  },
  "couponRate": {
   "type": "number",
   "description": "Annual coupon rate as decimal (0.05 = 5%)"
  },
  "periodsPerYear": {
   "type": "number",
   "description": "Coupon periods per year (2 = semiannual). Default 2."
  },
  "yieldToMaturity": {
   "type": "number",
   "description": "Annual yield to maturity as decimal"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "price": 925.61,
  "periods": 20,
  "currentYield": 0.054018,
  "couponPerPeriod": 25,
  "premiumOrDiscount": "discount"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bond-price-calculator-fixed-coupon-yield-to-maturity-7c3ea6bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
