ToolAssay

Gambler's ruin

Gambler's ruin: probability of going broke before hitting a target, and expected number of bets, for repeated unit bets.

Answeringour last check, 2026-10-21
1 of 1checks answered this week
520 msmedian answer time
$0.02listed price per call
$0.02price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

GET https://probability-calc.x402tookit.com/gamblers-ruin

CategoryEverything else
Provider hostprobability-calc.x402tookit.com
Networkseip155:137, eip155:42161, eip155:8453, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
Payment schemesexact
Self-reported calls, 30 days1 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-10-21 valid payment request 402$0.02 520 ms

Example input (from the provider)

{
  "method": "GET",
  "queryParams": {
    "bankroll": 100,
    "p": 0.473684,
    "target": 200
  },
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "bankroll": {
              "description": "Starting units, 1 to 1000000",
              "type": "integer"
            },
            "p": {
              "description": "Probability of winning each bet, 0 to 1 (roulette red/black on a double-zero wheel 18/38 = 0.473684)",
              "type": "number"
            },
            "target": {
              "description": "Stop when you reach this many units (omit to play until ruin)",
              "type": "integer"
            }
          },
          "required": [
            "p",
            "bankroll"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "asOf": {
              "type": [
                "null",
                "string"
              ]
            },
            "bankroll": {
              "type": [
                "null",
                "number"
              ]
            },
            "degraded": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "disclaimer": {
              "type": [
                "null",
                "string"
              ]
            },
            "expectedBets": {
              "type": [
                "null",
                "number"
              ]
            },
            "lossProbability": {
              "type": [
                "null",
                "number"
              ]
            },
            "notChecked": {
              "items": {
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "ratioQOverP": {
              "type": [
                "null",
                "number"
              ]
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "ruinProbability": {
              "type": [
                "null",
                "number"
              ]
            },
            "source": {
              "type": [
                "null",
                "string"
              ]
            },
            "successProbability": {
              "type": [
                "null",
                "number"
              ]
            },
            "summary": {
              "type": [
                "null",
                "string"
              ]
            },
            "target": {
              "type": [
                "null",
                "number"
              ]
            },
            "verdict": {
              "type": [
                "null",
                "string"
              ]
            },
            "winProbability": {
              "type": [
                "null",
                "number"
              ]
            }
          },
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

This page as JSON