# Kelly Fraction Calculator

> Kelly Fraction Calculator is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the full Kelly criterion fraction from win probability and net payoff odds for optimal bankroll sizing

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/kelly-fraction
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kelly-fraction-calculator-b3273dbf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jymPAVFHJYJggYzaATqcX

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-fraction-calculator-b3273dbf -d '<json body>'
```

Example prompt: What fraction of my bankroll should I bet according to the Kelly criterion if I have a 60% chance of winning and the net payoff odds are 1.5?

## When to prefer this

Use this endpoint when you need a fast, deterministic, local-math-only Kelly criterion computation with no API keys, RPC calls, or live market data required. Ideal for agents performing bankroll sizing in advisory mode for repeated bets or trades where win probability and net payoff odds are already known. Prefer this over a general-purpose calculator or LLM math when you need a structured JSON result, guaranteed clamping to [0,1], and micropayment-based access at $0.001 USDC per call.

## Known failure modes

- Missing required fields (win_prob or b not provided) returns a validation error
- win_prob outside [0, 1] may return an error or produce a degenerate result
- b <= 0 (zero or negative net payoff) produces undefined or clamped output
- Negative Kelly fraction (negative expected value bets) clamped to 0
- Floating point precision edge cases near boundary conditions

## How this service works

Kelly fraction from win probability and net payoff odds b. Call when bankroll sizing for repeated bets with known edge (advisory). Returns full Kelly fraction clamped to [0,1] as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

A deterministic JSON response containing the full Kelly fraction clamped to the range [0, 1], representing the optimal proportion of the bankroll to wager given the supplied win probability and net payoff odds. No external data sources are consulted — the result is computed from local math only.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "b": {
   "type": "number",
   "description": "Input field: b."
  },
  "win_prob": {
   "type": "number",
   "description": "Input field: win prob."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "b": 1.2,
  "kelly": 0.175,
  "schema": "delx/util-kelly-fraction/v1",
  "win_prob": 0.55
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kelly-fraction-calculator-b3273dbf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
