# Token Quote vs Received Amount — Weighted Mean Calculator

> Token Quote vs Received Amount — Weighted Mean Calculator is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Computes a weighted mean of token quote shortfall (quoted tokens minus received tokens) across multiple trade observations

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-token-quote-shortfall-weighted-mean?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-quote-vs-received-amount-weighted-mean-calculator-43e86ba9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O12wXMAR_gg6xzodJxFPv

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 token-quote-vs-received-amount-weighted-mean-calculator-43e86ba9 -d '<json body>'
```

Example prompt: Calculate the weighted mean token shortfall for these 4 trades: quoted 1000, received 980 with weight 1; quoted 1100, received 1078 with weight 2; quoted 1000, received 980 with weight 1; quoted 1100, received 1078 with weight 2.

## When to prefer this

Use this endpoint when you need a deterministic, weighted aggregate measure of token quote shortfall across a batch of 2–200 trade observations. Prefer it over simple arithmetic when trades have different importance or size and you want a size-weighted average. Not suitable for real-time slippage monitoring, live price feeds, or safety/risk scoring — it is a pure statistical computation on already-collected observations.

## Known failure modes

- Fewer than 2 rows supplied — minimum 2 observations required
- Weights array length does not match rows array length
- received_tokens exceeds maximum allowed value
- quoted_tokens is zero or negative — exclusiveMinimum enforced
- More than 200 rows submitted — maxItems limit exceeded
- Malformed numeric types in rows or weights arrays

## How this service works

Token quote versus received amount — Weighted result mean: Weighted result mean for Token quote versus received amount. Supplied token observations only. Deterministic calculation or caller-threshold verdict, not a live scan, safety proof or trade recommendation. Specialised preset in a shared 50-profile, 20-operation engine. 0.01 USDC includes one bounded weighted result mean report.

## Output

Returns a single weighted mean value representing the average shortfall between quoted and received token amounts across all supplied observations, weighted by the provided weight array. The report is deterministic and bounded — not a live scan or trade recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "quoted_tokens",
     "received_tokens"
    ],
    "properties": {
     "quoted_tokens": {
      "type": "number",
      "default": 1000,
      "maximum": 10000000000000000,
      "minimum": 0,
      "exclusiveMinimum": 0
     },
     "received_tokens": {
      "type": "number",
      "default": 980,
      "maximum": 10000000000000000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "quoted_tokens": 1000,
     "received_tokens": 980
    },
    {
     "quoted_tokens": 1100,
     "received_tokens": 1078
    },
    {
     "quoted_tokens": 1000,
     "received_tokens": 980
    },
    {
     "quoted_tokens": 1100,
     "received_tokens": 1078
    }
   ],
   "maxItems": 200,
   "minItems": 2
  },
  "weights": {
   "type": "array",
   "items": {
    "type": "number",
    "default": 1,
    "maximum": 1000000000000,
    "minimum": 0
   },
   "default": [
    1,
    2,
    1,
    2
   ],
   "maxItems": 200,
   "minItems": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-quote-vs-received-amount-weighted-mean-calculator-43e86ba9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
