Catalog/trade-risk-of-ruin

Calculators

Risk of ruin API

Gambler's-ruin risk of ruin for equal bet sizes: RoR = (q/p)^N for p>0.5 (q=1−p, N = bankroll in bet-units), the probability of losing the whole bankroll. Deterministic probability math. Answers 'what's my risk of ruin','chance of blowing up at 55% win rate','probability of losing my whole bankroll'.

Price$0.01per request
MethodPOST
Route/v1/calc/trade-risk-of-ruin
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calctradingrisk-of-ruinbankrollprobabilitymoney-managementgamblers-ruinrisk
API URLhttps://x402.hexl.dev/v1/calc/trade-risk-of-ruin
Integration docs
Example request
{
  "winRate": 0.55,
  "units": 20
}
Example response
{
  "winRate": 0.55,
  "units": 20,
  "edge": 0.1,
  "riskOfRuin": 0.0180716,
  "riskOfRuinPct": 1.80716,
  "rating": "moderate",
  "formula": "RoR = (q/p)^N for p>0.5, q=1−p"
}
Input schema
{
  "type": "object",
  "required": [
    "winRate",
    "units"
  ],
  "properties": {
    "winRate": {
      "type": "number",
      "description": "Win probability in (0,1).",
      "examples": [
        0.55
      ]
    },
    "units": {
      "type": "integer",
      "description": "Bankroll expressed as integer bet-units.",
      "examples": [
        20
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}