Catalog/finance-bond

Finance

Bond price & duration API

Price a bond from its terms and yield, with Macaulay/modified duration and current yield. Answers 'price this bond', 'bond duration', 'present value of a bond'.

Price$0.01per request
MethodPOST
Route/v1/finance/bond
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
financebonddurationfixed-incomeyieldpricing
API URLhttps://x402.hexl.dev/v1/finance/bond
Integration docs
Example request
{
  "faceValue": 1000,
  "couponRate": 0.05,
  "yearsToMaturity": 10,
  "yield": 0.06,
  "frequency": 2
}
Example response
{
  "price": 925.61,
  "currentYield": 0.054,
  "macaulayDuration": 7.79,
  "modifiedDuration": 7.56,
  "inputs": {}
}
Input schema
{
  "type": "object",
  "required": [
    "faceValue",
    "couponRate",
    "yearsToMaturity",
    "yield"
  ],
  "properties": {
    "faceValue": {
      "type": "number"
    },
    "couponRate": {
      "type": "number"
    },
    "yearsToMaturity": {
      "type": "number"
    },
    "yield": {
      "type": "number"
    },
    "frequency": {
      "type": "number",
      "enum": [
        1,
        2,
        4,
        12
      ],
      "default": 2
    }
  }
}
Output schema
{
  "type": "object",
  "required": [
    "price",
    "macaulayDuration",
    "modifiedDuration"
  ],
  "properties": {
    "price": {
      "type": "number"
    },
    "currentYield": {
      "type": "number"
    },
    "macaulayDuration": {
      "type": "number"
    },
    "modifiedDuration": {
      "type": "number"
    },
    "inputs": {
      "type": "object",
      "additionalProperties": true
    }
  }
}