Ir al contenido
GET /v1/npv

Net present value

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/npv-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

curl "https://api.oanor.com/npv-api/v1/npv" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/npv-api/v1/npv", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/npv-api/v1/npv");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/npv-api/v1/npv",
    headers={"x-oanor-key": "oanor_test_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "data": {
        "npv": 388.7713,
        "note": "NPV = −initial + Σ CFₜ/(1+r)ᵗ. A positive NPV adds value; the profitability index is PV of inflows ÷ initial.",
        "inputs": {
            "initial": 1000,
            "periods": 4,
            "rate_pct": 10
        },
        "decision": "accept (creates value)",
        "profitability_index": 1.388771,
        "present_value_inflows": 1388.7713
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:01.156Z",
        "request_id": "7f718673-5cc3-493d-b875-b8a52f9eb6f5"
    },
    "status": "ok",
    "message": "Net present value",
    "success": true
}