# Delx Commerce — Average Entry Price Calculator

> Delx Commerce — Average Entry Price 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 volume-weighted average entry price across a list of trade fills

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/avg-entry?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-average-entry-price-calculator-b05a68df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YImXBtu3aAS25bvTqeDCk

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-average-entry-price-calculator-b05a68df -d '<json body>'
```

Example prompt: Calculate my average entry price for a position where I have fills like [{price: 10, size: 2}, {price: 12, size: 1}, {price: 13, size: 1}].

## When to prefer this

Use this endpoint when you need a quick, pay-per-use computation of volume-weighted average entry price from a list of trade fills without setting up any account or subscription. It is ideal for agents operating in trading, DeFi, or portfolio management contexts that need cost-basis calculations on the fly, paid in USDC via the x402 protocol.

## Known failure modes

- Empty or missing fills array returns an error or undefined result
- Non-numeric price or size values in fills cause computation failure
- Malformed JSON body rejected with 400-level error
- Payment failure via x402 protocol blocks request execution
- Zero-size fills may cause division errors or be silently ignored

## 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 computed average entry price (avg_entry), total position size (total_size), number of fills processed (fills), and a schema identifier (schema: 'delx/util-avg-entry/v1').

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fills": 2,
  "schema": "delx/util-avg-entry/v1",
  "avg_entry": 11.5,
  "total_size": 4
 }
}
```

## More

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