/v1/compare
DCA vs lump-sum vs best/worst-case timing
Probeer het live
10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.
Het werkt. Haal een API-key op en gebruik hem in je project.
Verkrijg een API-sleutelCodefragmenten
curl "https://api.oanor.com/dca-api/v1/compare" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/dca-api/v1/compare", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/dca-api/v1/compare");
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/compare",
headers={"x-oanor-key": "oanor_test_..."}
)
Voorbeeldrespons
Een echte respons van dit endpoint, vastgelegd bij de laatste health check.
{
"data": {
"note": "best_case / worst_case = investing the whole sum at the lowest / highest price in the series (timing bounds).",
"source": "DCA",
"fee_pct": 0,
"periods": 12,
"ranking": [
"best_case",
"lump_sum",
"dca",
"worst_case"
],
"strategies": {
"dca": {
"units": 10.75237033,
"value": 1451.57,
"profit": 251.57,
"roi_pct": 20.9642,
"avg_cost": 111.60329895
},
"lump_sum": {
"units": 12,
"value": 1620,
"profit": 420,
"roi_pct": 35,
"buy_price": 100
},
"best_case": {
"units": 13.33333333,
"value": 1800,
"profit": 600,
"roi_pct": 50,
"buy_price": 90
},
"worst_case": {
"units": 8.57142857,
"value": 1157.14,
"profit": -42.86,
"roi_pct": -3.5714,
"buy_price": 140
}
},
"current_price": 135,
"total_invested": 1200
},
"meta": {
"timestamp": "2026-06-11T07:49:30.292Z",
"request_id": "25d5e019-c2c6-4b8a-af32-7d9e1a872a7d"
},
"status": "ok",
"message": "Strategies compared",
"success": true
}