Evaluate an investment from its cash flows
agents.204-168-199-108.sslip.io/v1/finance/npv-irr
Evaluate an investment from its cash flows: net present value at a discount rate, internal rate of return (robust bisection; warns when several IRRs may exist), simple and discounted payback period (fractional periods), profitability index and a plain-English decision. Also CAGR, total return and multiple from start value, end value and years. cash_flows[0] is time 0 (Excel: cf0 + NPV(rate, cf1..c
GET
https://agents.204-168-199-108.sslip.io/v1/finance/npv-irrUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/finance/npv-irr?cash_flows=-10000%2C+3000%2C+4200%2C+6800&discount_rate=8&end_value=14000&start_value=10000&years=3");
console.log(await res.json());Example input
{
"cash_flows": "-10000, 3000, 4200, 6800",
"discount_rate": "8",
"end_value": "14000",
"start_value": "10000",
"years": "3"
}