Hermes Plant logo

Hermes Plant

Finance & quant APIs for AI agents

DealAnalyzer

$2.00/call

Full deal underwriting — DCF, returns, sensitivity & waterfall in one call.

POST /api/agent-services/dealanalyzer/analyze
financedcfvaluationirrwaterfallsensitivityprivate-equityunderwritingx402agent

What it does

Premium deal underwriting in one deterministic call: a DCF valuation (enterprise value, equity value, implied share price; Gordon-growth or exit-multiple terminal), equity returns (IRR/XIRR, NPV, MOIC, payback), a discount-rate × terminal-assumption sensitivity grid with the resulting enterprise-value range, and the LP/GP distribution waterfall on the proceeds (defaulting the distributable to the DCF equity value). Pure math from caller-provided inputs — no market-data feed, no fabrication — with evidence-backed findings on every section.

  • DCF valuation: enterprise value, equity, share price
  • IRR/XIRR, NPV, MOIC + a sensitivity grid
  • LP/GP waterfall on the DCF proceeds

Example request

POST /api/agent-services/dealanalyzer/analyze

{
  "dcf": {
    "cashflows": [
      120,
      140,
      160,
      180,
      200
    ],
    "discountRate": 0.11,
    "exitMultiple": 9,
    "netDebt": 300,
    "shares": 100
  },
  "returns": {
    "cashflows": [
      -1000,
      0,
      0,
      0,
      0,
      2100
    ],
    "discountRate": 0.11
  },
  "waterfall": {
    "contributedCapital": 1000,
    "carryPercentage": 0.2,
    "catchUpPercentage": 1,
    "preferredRate": 0.08,
    "years": 5
  }
}

Example response (HTTP 200)

Deterministic — the same inputs always return the same audited output.

{
  "service": "dealanalyzer",
  "requestId": "deal-1a2b3c4d",
  "valuation": {
    "enterpriseValue": 1646.18,
    "equityValue": 1346.18,
    "impliedSharePrice": 13.46,
    "terminalMethod": "exit-multiple"
  },
  "returns": {
    "mode": "periodic",
    "irrAnnual": 0.1599,
    "npv": 246.27,
    "moic": 2.1,
    "paybackPeriod": 5
  },
  "sensitivity": {
    "axis": "exit-multiple",
    "enterpriseValueRange": {
      "min": 1409.32,
      "max": 1883.04
    }
  },
  "waterfall": {
    "distributable": 1346.18,
    "distributableSource": "dcf-equity-value",
    "gpCarry": 18.55,
    "effectiveGpCarryPct": 0.2
  },
  "findings": [
    {
      "rule": "valuation",
      "severity": "info",
      "why": "Base-case DCF valuation.",
      "evidence": "method=exit-multiple",
      "fix": null
    }
  ]
}

Input schema

Top-level request fields. Nested shapes are shown in the example above and the OpenAPI spec.

FieldTypeRequiredDescription
dcfobjectYesRequired. DCF valuation inputs.
returnsobjectOptional. Equity cash-flow stream for IRR/XIRR, NPV, MOIC, payback.
waterfallobjectOptional. LP/GP distribution terms. distributable defaults to the DCF equity value.
sensitivityobjectOptional. Additive deltas swept around the base case.

How to call it over x402

  1. 1. Send the request. The first unpaid call returns HTTP 402 with an x402 payment challenge — $2.00, USDC on Base, and the recipient.
  2. 2. Pay per call. Your x402 client signs the USDC payment and retries automatically — no API key, no account, no subscription. New to x402?
  3. 3. Read the result. HTTP 200 returns the computed values plus evidence-backed findings.

With the x402 fetch client (Node / TypeScript)

import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_WALLET_KEY);
const pay = wrapFetchWithPayment(fetch, account); // USDC on Base

const res = await pay("https://hermesplant.com/api/agent-services/dealanalyzer/analyze", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
  "dcf": {
    "cashflows": [
      120,
      140,
      160,
      180,
      200
    ],
    "discountRate": 0.11,
    "exitMultiple": 9,
    "netDebt": 300,
    "shares": 100
  },
  "returns": {
    "cashflows": [
      -1000,
      0,
      0,
      0,
      0,
      2100
    ],
    "discountRate": 0.11
  },
  "waterfall": {
    "contributedCapital": 1000,
    "carryPercentage": 0.2,
    "catchUpPercentage": 1,
    "preferredRate": 0.08,
    "years": 5
  }
}),
});

const result = await res.json();

Inspect the 402 with curl

curl -i -X POST https://hermesplant.com/api/agent-services/dealanalyzer/analyze \
  -H "content-type: application/json" \
  -d '{"dcf":{"cashflows":[120,140,160,180,200],"discountRate":0.11,"exitMultiple":9,"netDebt":300,"shares":100},"returns":{"cashflows":[-1000,0,0,0,0,2100],"discountRate":0.11},"waterfall":{"contributedCapital":1000,"carryPercentage":0.2,"catchUpPercentage":1,"preferredRate":0.08,"years":5}}'
# → HTTP/1.1 402 Payment Required  (x402 challenge: price, USDC asset, Base network, recipient)
# → sign the USDC-on-Base payment and retry to receive HTTP 200

Prefer zero code? This endpoint is also exposed as a tool on the Hermes Plant MCP server, so an MCP-capable agent can call it with its own x402 wallet.

Other agent services

← All agent servicesAPI docsOpenAPI spec

Need a calculator that isn’t here yet? contact@hermesplant.com