Ir al contenido
GET /v1/risk-of-ruin

Modelled probability of ruin

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/strategysim-api

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

Obtener una clave API

Fragmentos de código

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

Respuesta de ejemplo

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

{
    "data": {
        "edge": {
            "has_edge": false,
            "expectancy_R": 0,
            "profit_factor": 1,
            "breakeven_win_rate": 0.5,
            "expected_return_per_trade_pct": 0
        },
        "note": "Ruin = the equity ever falls to a 50% drawdown from the starting capital, over 100 trades.",
        "inputs": {
            "runs": 10000,
            "seed": 12345,
            "payoff": 1,
            "trades": 100,
            "risk_pct": 5,
            "win_rate": 0.5,
            "ruin_drawdown": 0.5
        },
        "source": "STRATEGYSIM",
        "probability_of_ruin": 0.2174,
        "probability_of_profit": 0.3732
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:31.600Z",
        "request_id": "fb35d261-1c14-4d6b-a076-eb25eed5d80b"
    },
    "status": "ok",
    "message": "Risk of ruin computed",
    "success": true
}