# Kelly Criterion Position Sizer

> Kelly Criterion Position Sizer is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Computes the Kelly-criterion optimal bet fraction and dollar position size from a win probability and payoff ratio, or from an edge and odds.

## Facts

- Endpoint: GET https://api.agentstools.dev/quant/kelly?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kelly-criterion-position-sizer-1dc47b54
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4E6IfvYWpAD3hfhVVKvbt

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability kelly-criterion-position-sizer-1dc47b54
```

Example prompt: I have a 55% win probability and a win/loss ratio of 1.8, with a $10,000 bankroll — use half-Kelly (fraction 0.5) and tell me the optimal position size to bet.

## When to prefer this

Use this endpoint when you need a pure, fast, stateless Kelly criterion computation — no data storage, no external data fetching. Ideal for AI agents doing trade sizing, sports betting staking plans, or any probabilistic position management where you already have the win probability and payoff ratio and just need the math done correctly.

## Known failure modes

- Missing both (win_prob + win_loss_ratio) and (edge + odds) input pairs returns an error
- win_loss_ratio or odds <= 0 returns a validation error
- win_prob outside [0,1] returns a validation error
- Negative Kelly fraction (negative edge) returns 0 when clamped
- Payment not included or insufficient returns HTTP 402

## How this service works

Kelly-criterion optimal bet fraction and position sizing from a win probability and payoff, or from an edge and odds. Pure computation over your inputs.

## Output

Returns the Kelly-optimal bet fraction (a number in [0,1] representing the share of bankroll to wager) and, if a bankroll was supplied, the dollar amount to position. Fraction is clamped to [0,1] by default; fractional-Kelly multiplier is applied if specified.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "edge": {
       "type": "number",
       "description": "Expected edge, alternative input paired with odds"
      },
      "odds": {
       "type": "number",
       "description": "Odds b, alternative input paired with edge (> 0)"
      },
      "clamp": {
       "type": "boolean",
       "description": "Clamp the Kelly fraction to [0, 1], default true"
      },
      "bankroll": {
       "type": "number",
       "description": "Bankroll to size the position against"
      },
      "fraction": {
       "type": "number",
       "description": "Fractional-Kelly multiplier, default 1"
      },
      "win_prob": {
       "type": "number",
       "description": "Probability of a win in [0, 1]"
      },
      "win_loss_ratio": {
       "type": "number",
       "description": "Payoff ratio b of win size to loss size (> 0)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kelly-criterion-position-sizer-1dc47b54/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
