# Token Buy-to-Sell Activity Ratio — Weighted Result Mean

> Token Buy-to-Sell Activity Ratio — 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-15).

Computes the weighted mean of token buy-to-sell activity ratios across multiple supplied observations using caller-provided weights.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-bx-token-buy-sell-ratio-weighted-mean?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-buy-to-sell-activity-ratio-weighted-result-mean-a815f46b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A6zTtXk8u4w8Y10eB5-8o

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-buy-to-sell-activity-ratio-weighted-result-mean-a815f46b -d '<json body>'
```

Example prompt: Calculate the weighted mean buy-to-sell ratio for these 4 token observations — buys [120, 132, 120, 132] with sells [80, 88, 80, 88] — using weights [1, 2, 1, 2].

## When to prefer this

Use this endpoint when you need a single scalar summary of token buy-to-sell pressure across multiple time periods or data slices, with the ability to assign differential importance to observations via weights. Prefer it over simple averaging when recency, volume, or reliability of individual observations vary and you want a deterministic, reproducible calculation rather than a live market scan.

## Known failure modes

- Missing required buy_count or sell_count fields in any row returns validation error
- sell_count of exactly 0 (exclusiveMinimum: 0) causes rejection to avoid division by zero
- Fewer than 2 rows supplied violates minItems constraint
- More than 200 rows exceeds maxItems limit
- Mismatched array lengths between rows and weights arrays may cause error
- Payment not processed or insufficient USDC balance causes 402 rejection

## How this service works

Token buy-to-sell activity ratio — Weighted result mean: Weighted result mean for Token buy-to-sell activity ratio. 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 aggregated buy-to-sell activity ratio across all supplied observation rows, computed deterministically using the provided weights. The result reflects the average balance of buying versus selling activity, with higher-weighted rows contributing more to the final score. This is a pure calculation result, not a live market scan or trade signal.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "buy_count",
     "sell_count"
    ],
    "properties": {
     "buy_count": {
      "type": "number",
      "default": 120,
      "maximum": 10000000000000000,
      "minimum": 0
     },
     "sell_count": {
      "type": "number",
      "default": 80,
      "maximum": 10000000000000000,
      "minimum": 0,
      "exclusiveMinimum": 0
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "buy_count": 120,
     "sell_count": 80
    },
    {
     "buy_count": 132,
     "sell_count": 88
    },
    {
     "buy_count": 120,
     "sell_count": 80
    },
    {
     "buy_count": 132,
     "sell_count": 88
    }
   ],
   "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-buy-to-sell-activity-ratio-weighted-result-mean-a815f46b/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)
