# Delx Commerce Win Rate Calculator

> Delx Commerce Win Rate Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the win rate (percentage of profitable trades) from an array of PnL values

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/win-rate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-win-rate-calculator-5d8cbcfc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DfChqO3ue1nkM1Iwb06oE

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 delx-commerce-win-rate-calculator-5d8cbcfc -d '<json body>'
```

Example prompt: Calculate the win rate for these trade PnLs: [120, -45, 300, -80, 200] — I want to know how many were winners and what percentage that is.

## When to prefer this

Use this endpoint when you need a fast, cheap ($0.001 USDC), no-signup computation of win rate from a flat array of PnL numbers. Ideal for AI agents doing trading analytics, strategy evaluation, or backtest summarization where you want a verifiable on-chain micropayment and don't want to implement the win-rate logic yourself.

## Known failure modes

- Empty or missing pnls array returns an error or undefined result
- Non-numeric values in the pnls array may cause computation failure
- Payment failure via x402 prevents the call from completing
- Malformed request body results in a 400-level error

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with the total number of trades (n), the number of winning trades (wins), the win rate as a decimal (e.g. 0.6 for 60%), and a schema identifier string (delx/util-win-rate/v1).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "pnls": {
   "type": "array",
   "description": "Input field: pnls."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "n": 5,
  "wins": 3,
  "schema": "delx/util-win-rate/v1",
  "win_rate": 0.6
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-win-rate-calculator-5d8cbcfc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
