Skip to main content
POST
/
quantlib
/
solver
/
finance
/
xirr
Calculate Extended IRR (XIRR)
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/solver/finance/xirr \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "cashflows": [
    -100000,
    20000,
    30000,
    25000,
    60000
  ],
  "dates": [
    0,
    0.25,
    0.75,
    1.5,
    2
  ],
  "guess": 0.1
}
'
{
  "success": true,
  "data": {
    "xirr": 0.1523
  }
}

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, 20000, 30000, 25000, 60000]
dates
number[]
required

Array of dates as year fractions from the first date

Example:
[0, 0.25, 0.75, 1.5, 2]
guess
number
default:0.1

Initial guess for the XIRR solver

Example:

0.1

Response

Successful Response

success
boolean
Example:

true

data
object