Catalog/finance-cashflow

Finance

NPV / IRR / XIRR / CAGR API

Cash-flow analytics: net present value (npv), internal rate of return (irr), date-aware IRR (xirr), and compound annual growth rate (cagr). IRR/XIRR are root-finding problems LLMs reliably get wrong; this is deterministic. Answers 'IRR of these cash flows', 'NPV at 10%', 'CAGR from 100 to 200 over 3 years', 'XIRR for these dated flows'.

Price$0.01per request
MethodPOST
Route/v1/finance/cashflow
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
financenpvirrxirrcagrcash-flowinvestmentreturn
API URLhttps://x402.hexl.dev/v1/finance/cashflow
Integration docs
Example request
{
  "op": "irr",
  "cashflows": [
    -1000,
    500,
    500,
    500
  ]
}
Example response
{
  "op": "irr",
  "irr": 0.23375338,
  "irrPercent": 23.375338
}
Input schema
{
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "type": "string",
      "enum": [
        "npv",
        "irr",
        "xirr",
        "cagr"
      ]
    },
    "cashflows": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "rate": {
      "type": "number"
    },
    "dates": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "begin": {
      "type": "number"
    },
    "end": {
      "type": "number"
    },
    "years": {
      "type": "number"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}