# QuantOracle Credit Spread Calculator

> QuantOracle Credit Spread Calculator is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Computes the credit spread between a corporate or structured instrument and a risk-free benchmark given bond/issuer inputs

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/fi/credit-spread
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-1639caa6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h2Sa9Zqxi5aIzUB0yHiNo

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 api-quantoracle-dev-1639caa6 -d '<json body>'
```

Example prompt: Calculate the credit spread for a 10-year investment-grade corporate bond with a yield of 5.4% against a risk-free treasury rate of 4.1%, and give me the spread in basis points along with the implied risk premium.

## When to prefer this

Use this endpoint when you need a fast, quantitative computation of credit spread for fixed income instruments — especially when integrating into automated bond analysis pipelines, portfolio risk workflows, or credit pricing models. Prefer this over manual calculation or generic financial data APIs when you need structured numeric output with spread duration and risk premium components ready for downstream quant analysis.

## Known failure modes

- Invalid or missing yield inputs returns a 400 validation error
- Risk-free rate greater than bond yield may return negative spread or an error
- Unsupported maturity or rating input returns a 422 unprocessable entity
- Payment not included or insufficient USDC balance returns a 402 payment required
- Malformed JSON body returns a 400 bad request

## How this service works

QuantOracle: fi/credit-spread

## Output

Returns the computed credit spread in basis points between the input bond yield and the risk-free benchmark, along with related fixed income risk metrics such as spread duration and risk premium decomposition.

## Example request

```json
{
 "bond_price": 95,
 "coupon_rate": 0.05,
 "maturity_years": 5,
 "risk_free_curve": [
  {
   "rate": 0.04,
   "tenor": 1
  },
  {
   "rate": 0.042,
   "tenor": 3
  },
  {
   "rate": 0.045,
   "tenor": 5
  }
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "bond_price": {
   "type": "number",
   "title": "Bond Price",
   "description": "Observed bond price"
  },
  "face_value": {
   "type": "number",
   "title": "Face Value",
   "default": 1000,
   "description": "Face value of the bond"
  },
  "coupon_rate": {
   "type": "number",
   "title": "Coupon Rate",
   "description": "Annual coupon rate"
  },
  "maturity_years": {
   "type": "integer",
   "title": "Maturity Years",
   "description": "Years to maturity"
  },
  "risk_free_curve": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "CurvePoint",
    "required": [
     "tenor",
     "rate"
    ],
    "properties": {
     "rate": {
      "type": "number",
      "title": "Rate",
      "description": "Interest rate at this tenor"
     },
     "tenor": {
      "type": "number",
      "title": "Tenor",
      "description": "Maturity in years"
     }
    }
   },
   "title": "Risk Free Curve",
   "description": "Risk-free yield curve points"
  },
  "payment_frequency": {
   "type": "integer",
   "title": "Payment Frequency",
   "default": 2,
   "description": "Coupon payments per year"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-1639caa6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
