# Token Pool Quote Relative Difference — Weighted Result Mean

> Token Pool Quote Relative Difference — Weighted Result Mean 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-12).

Computes the weighted mean of relative price differences between pool quotes and reference prices across multiple token observations.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-token-pool-price-gap-weighted-mean?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-pool-quote-relative-difference-weighted-result-mean-d824f419
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tiW5R2iDi1MNS7GQcP4P8

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-pool-quote-relative-difference-weighted-result-mean-d824f419 -d '<json body>'
```

Example prompt: Calculate the weighted mean of the relative price differences for these token pool observations: pool prices [1.1, 1.21, 1.1, 1.21] vs reference prices [1.0, 1.1, 1.0, 1.1], using weights [1, 2, 1, 2].

## When to prefer this

Choose this endpoint when you need a deterministic, weighted aggregate of relative price deviations across multiple token pool observations — especially when observations have different importance levels (expressed via weights). It is purpose-built for DeFi/token pool price gap analysis and avoids the need for custom aggregation logic. Prefer it over simple mean endpoints when recency or volume weighting matters across your observation set.

## Known failure modes

- Mismatched array lengths between rows and weights cause validation error
- rows array with fewer than 2 items returns schema validation error
- pool_price or reference_price of zero or negative causes exclusiveMinimum validation failure
- weights containing negative values fail minimum constraint
- More than 200 rows or weights exceed maxItems limit
- Malformed JSON body returns HTTP 400 or payment gateway error
- Payment not supplied or insufficient USDC causes x402 payment required response

## How this service works

Token pool quote relative difference — Weighted result mean: Weighted result mean for Token pool quote relative difference. 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 relative difference (as a fraction or ratio) between pool prices and reference prices across all supplied observations, weighted by the provided weights array. This is a deterministic calculation — not a live scan or trading recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "pool_price",
     "reference_price"
    ],
    "properties": {
     "pool_price": {
      "type": "number",
      "default": 1.1,
      "maximum": 10000000000000000,
      "minimum": 0,
      "exclusiveMinimum": 0
     },
     "reference_price": {
      "type": "number",
      "default": 1,
      "maximum": 10000000000000000,
      "minimum": 0,
      "exclusiveMinimum": 0
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "pool_price": 1.1,
     "reference_price": 1
    },
    {
     "pool_price": 1.2100000000000002,
     "reference_price": 1.1
    },
    {
     "pool_price": 1.1,
     "reference_price": 1
    },
    {
     "pool_price": 1.2100000000000002,
     "reference_price": 1.1
    }
   ],
   "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-pool-quote-relative-difference-weighted-result-mean-d824f419/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)
