# Average Entry Price (VWAP Fill Calculator)

> Average Entry Price (VWAP Fill Calculator) is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the volume-weighted average entry price across multiple trade fills, returning the blended cost basis and total position size.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/avg-entry
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/average-entry-price-vwap-fill-calculator-2f628a7d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cDF1mraCxTn7uhPUAU856

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 average-entry-price-vwap-fill-calculator-2f628a7d -d '<json body>'
```

Example prompt: I bought ETH in three separate fills — 1.5 ETH at $2,800, 2.0 ETH at $2,750, and 0.5 ETH at $2,900 — can you calculate my volume-weighted average entry price and total position size?

## When to prefer this

Use this endpoint when you need a fast, deterministic, cost-free (beyond $0.001 per call) computation of blended entry price from multiple fills without any external market data, RPC calls, or API keys. Ideal for agent workflows that track cost basis, reconcile partial fills, or need a single authoritative average entry price for risk or P&L calculations.

## Known failure modes

- Empty fills array returns an error or undefined result
- Fills with zero size cause division-by-zero or are rejected
- Malformed fill objects missing price or size fields return validation errors
- Non-numeric price or size values cause parsing failures

## How this service works

Volume-weighted average entry across fill price/size pairs. Call when averaging multiple fills into one book cost basis. Returns average entry and total size as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a deterministic JSON object containing the volume-weighted average entry price across all provided fills and the total aggregated position size, computed locally without any external data sources.

## 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/average-entry-price-vwap-fill-calculator-2f628a7d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
