# Delx Commerce Profit Factor Calculator

> Delx Commerce Profit Factor 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 profit factor from a list of PnL values, returning gross wins, gross losses, and the win/loss ratio

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/profit-factor?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-profit-factor-calculator-a884afa0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6VguscJiqFj4nwbImsqOg

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-profit-factor-calculator-a884afa0 -d '<json body>'
```

Example prompt: Calculate the profit factor for these trade PnLs: [15, -3, 5, -4, 10, 8, -2, -1, 12, -3] — I want to see gross wins, gross losses, and the overall ratio.

## When to prefer this

Choose this endpoint when you need a fast, cheap, deterministic profit factor computation from raw PnL data without setting up any account or subscription. Ideal for AI trading agents that need on-demand performance metric calculation at $0.001 per call with USDC micropayment via x402. Prefer over building your own logic when you need verifiable delivery guarantees and no infrastructure overhead.

## Known failure modes

- Empty or missing pnls array returns an error or undefined result
- All-negative PnL array yields zero profit factor
- All-positive PnL array yields infinite profit factor (handled via infinite:true flag)
- Malformed input types (non-numeric values in array) may cause computation errors
- Payment failure via x402 protocol blocks the request before computation

## 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 schema identifier, a boolean indicating whether the profit factor is infinite (no losses), gross win total, gross loss total, and the computed profit factor as a decimal number (e.g. 2.857 meaning $2.86 won per $1 lost).

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-profit-factor/v1",
  "infinite": false,
  "gross_win": 20,
  "gross_loss": 7,
  "profit_factor": 2.857142857142857
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-profit-factor-calculator-a884afa0/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)
