# Trade Balance Weighted Result Mean Calculator

> Trade Balance Weighted Result 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-27).

Calculates a weighted mean of trade balance figures (exports minus imports) across up to 200 data rows using user-supplied nonnegative weights.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-finance-trade-balance-weighted-mean?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trade-balance-weighted-result-mean-calculator-2cb7c1f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_npA2dyjTZF1ZGmw_sorx5

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 trade-balance-weighted-result-mean-calculator-2cb7c1f6 -d '<json body>'
```

Example prompt: Calculate the weighted mean trade balance for these four periods: exports of 250, 275, 250, 275 and imports of 200, 220, 200, 220 — use weights of 1, 2, 1, 2 to emphasize the more recent quarters.

## When to prefer this

Choose this endpoint when you need a statistically weighted mean of trade balance figures (exports minus imports) across multiple periods, regions, or entities, especially when different observations carry different importance. It is appropriate when you have your own data and need a formula-backed weighted average with documented limitations — not when you need live trade data feeds, pooled accounting ratios, or trade execution.

## Known failure modes

- Fewer than 2 rows provided — minimum is 2 data points
- More than 200 rows submitted — exceeds maximum
- Negative exports or imports values supplied — must be nonnegative
- Weights array length does not match rows array length
- All weights are zero — division by zero in weighted mean
- Exports or imports values exceed 1,000,000,000,000 maximum
- Payment of 0.01 USDC not completed — 402 Payment Required response

## How this service works

Trade balance - Weighted result mean: Calculate a mean of up to 200 results using supplied nonnegative weights; not a pooled accounting ratio. Metric: Trade balance. Supplied figures only; returns JSON with formula, units and limitations. One of 50 calculators with 20 analysis modes. No live feed, financial advice or trade execution. 0.01 USDC includes one bounded weighted result mean report.

## Output

A JSON object containing the weighted mean trade balance value computed from the supplied exports and imports rows, along with the formula used, units, and stated limitations of the calculation. No live data, financial advice, or trade execution is included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "exports",
     "imports"
    ],
    "properties": {
     "exports": {
      "type": "number",
      "default": 250,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period"
     },
     "imports": {
      "type": "number",
      "default": 200,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period"
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "exports": 250,
     "imports": 200
    },
    {
     "exports": 275,
     "imports": 220.00000000000003
    },
    {
     "exports": 250,
     "imports": 200
    },
    {
     "exports": 275,
     "imports": 220.00000000000003
    }
   ],
   "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/trade-balance-weighted-result-mean-calculator-2cb7c1f6/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)
