# Delx Commerce — Unrealized PnL Calculator

> Delx Commerce — Unrealized PnL 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).

Calculates the unrealized profit and loss for a trading position given mark price, position size, and entry price.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/unrealized-pnl?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-unrealized-pnl-calculator-5816543e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sqrUZnYKBcRSAPfIbpNcr

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-unrealized-pnl-calculator-5816543e -d '<json body>'
```

Example prompt: What's my unrealized PnL on a position where I entered at 100, the current mark price is 95, and my size is 3 contracts?

## When to prefer this

Choose this endpoint when you need a fast, verifiable, pay-per-call computation of unrealized PnL for a single open position without setting up any accounts. Ideal for AI agents and trading bots that need on-demand PnL checks with micropayment billing via USDC on Base or Solana.

## Known failure modes

- Missing required fields (mark, size, or entry) result in a validation error
- Non-integer values for mark, size, or entry may cause a 400 error
- Payment failure via x402 protocol prevents API access
- Network or service downtime returns a 5xx 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 containing the input values (mark, size, entry) along with the computed unrealized_pnl value (e.g. -15 for a losing position), and a schema identifier string.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mark": 95,
  "size": 3,
  "entry": 100,
  "schema": "delx/util-unrealized-pnl/v1",
  "unrealized_pnl": -15
 }
}
```

## More

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