Skip to main content
POST
/
quantlib
/
solver
/
finance
/
irr
Calculate Internal Rate of Return (IRR)
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/solver/finance/irr \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "cashflows": [
    -100000,
    30000,
    35000,
    40000,
    45000
  ],
  "times": [
    0,
    1,
    2,
    3,
    4
  ],
  "guess": 0.1
}
'
{
  "success": true,
  "data": {
    "irr": 0.1867
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
cashflows
number[]
required

Array of cash flows (negative for outflows, positive for inflows)

Example:
[-100000, 30000, 35000, 40000, 45000]
times
number[]

Optional array of times in years for each cash flow (if not provided, assumes annual periods starting at 0)

Example:
[0, 1, 2, 3, 4]
guess
number
default:0.1

Initial guess for the IRR solver

Example:

0.1

Response

Successful Response

success
boolean
Example:

true

data
object