Zum Inhalt springen
GET /v1/advantage

Advantage / disadvantage odds

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/dicepool-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "P(success) = faces ≥ target ÷ sides. Advantage = 1 − (1−p)² (roll twice, keep higher); disadvantage = p². On a d20 advantage adds roughly +3.3 to the average roll.",
        "inputs": {
            "sides": 20,
            "target": 11
        },
        "average_roll": 10.5,
        "average_with_advantage": 13.825,
        "normal_success_percent": 50,
        "advantage_success_percent": 75,
        "average_with_disadvantage": 7.175,
        "disadvantage_success_percent": 25
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:06.897Z",
        "request_id": "306cc059-30c6-4788-b0d7-1ee0fac3dea8"
    },
    "status": "ok",
    "message": "Advantage odds",
    "success": true
}