# Delx Commerce PnL Absolute Calculator

> Delx Commerce PnL Absolute 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 absolute profit and loss (PnL) value for a trade given entry price, exit price, and position size

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/pnl-abs?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-pnl-absolute-calculator-ca9e0c79
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l9o2OvRyb6f80UFagjSIN

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-pnl-absolute-calculator-ca9e0c79 -d '<json body>'
```

Example prompt: Calculate the absolute PnL for a trade where I entered at 100, exited at 110, and had a position size of 2.

## When to prefer this

Choose this endpoint when you need a fast, trustless, pay-per-result computation of absolute PnL without any signup or API key overhead. It is ideal for AI agents that handle trade outcome calculations on-the-fly and require verifiable, auditable delivery via x402 micropayments on Base or Solana.

## Known failure modes

- Missing required fields (entry, exit, or size) returns a validation error
- Non-integer values for entry, exit, or size may cause a type error
- Payment failure or insufficient USDC balance results in a 402 Payment Required response
- Network timeout on Base or Solana payment rails may prevent settlement

## 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 containing the calculated absolute PnL value along with the echoed entry price, exit price, and position size, tagged with a schema identifier (delx/util-pnl-abs/v1). Example: {"pnl": 20, "exit": 110, "size": 2, "entry": 100, "schema": "delx/util-pnl-abs/v1"}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "exit": {
   "type": "integer",
   "description": "Input field: exit."
  },
  "size": {
   "type": "integer",
   "description": "Input field: size."
  },
  "entry": {
   "type": "integer",
   "description": "Input field: entry."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "pnl": 20,
  "exit": 110,
  "size": 2,
  "entry": 100,
  "schema": "delx/util-pnl-abs/v1"
 }
}
```

## More

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