Naar de inhoud
GET /v1/calculate

DCA outcome + lump-sum comparison

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/dca-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/dca-api/v1/calculate" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/dca-api/v1/calculate", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/dca-api/v1/calculate");
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/dca-api/v1/calculate",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "profit": 251.57,
        "source": "DCA",
        "winner": "lump_sum",
        "fee_pct": 0,
        "periods": 12,
        "roi_pct": 20.9642,
        "lump_sum": {
            "units": 12,
            "value": 1620,
            "profit": 420,
            "roi_pct": 35,
            "buy_price": 100
        },
        "total_units": 10.75237033,
        "average_cost": 111.60329895,
        "current_price": 135,
        "current_value": 1451.57,
        "total_invested": 1200,
        "dca_vs_lump_sum": -168.43,
        "contribution_per_period": 100
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:30.189Z",
        "request_id": "4a67d026-c245-4cd0-abe8-9ab90139bcb5"
    },
    "status": "ok",
    "message": "DCA calculated",
    "success": true
}