Skip to content
GET /v1/ruin

Risk of ruin from your edge

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/riskofruin-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

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

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "edge": "positive",
        "note": "Risk of ruin solved from the gambler's-ruin equation p*r^(1+b) - r + q = 0; capital_units = ruin_level / risk_per_trade. Negative expectancy => ruin is certain.",
        "payoff": 1.5,
        "source": "RISK-OF-RUIN",
        "expectancy_r": 0.375,
        "risk_of_ruin": 0,
        "win_rate_pct": 55,
        "capital_units": 50,
        "ruin_level_pct": 100,
        "risk_of_ruin_pct": 0,
        "single_unit_ruin": 0.60953854,
        "risk_per_trade_pct": 2
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:13.009Z",
        "request_id": "ad7aa4df-2927-45cb-8495-c19ddf5c880e"
    },
    "status": "ok",
    "message": "Risk of ruin computed",
    "success": true
}