# Trade Observations: Category Frequencies + Secondary-Measure Weighted Mean

> Trade Observations: Category Frequencies + Secondary-Measure Weighted 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-29).

Computes category frequency counts and a secondary-measure weighted mean for up to 200 trade observation records containing export and import amounts.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-ib26-economics-06-109?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trade-observations-category-frequencies-secondary-measure-weighted-mean-1631e536
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qDR4_I1bEbdrNPbaOOd50

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-observations-category-frequencies-secondary-measure-weighted-mean-1631e536 -d '<json body>'
```

Example prompt: I have 150 rows of trade data with region, date, export_amount, and import_amount columns — can you calculate the category frequencies by region and the weighted mean of export_amount across those records?

## When to prefer this

Choose this endpoint when you have tabular trade observation data (with region, date, export and import amounts) and need both a category frequency distribution and a weighted mean statistic in a single low-cost call — particularly when working offline with supplied data rather than needing live market lookups or predictions.

## Known failure modes

- Fewer than 1 row supplied — minimum 1 row required
- More than 200 rows supplied — exceeds maximum batch size
- Missing required fields (row_id, region, date, export_amount, import_amount) on any row
- Date strings not matching YYYY-MM-DD pattern
- Numeric values outside allowed range (-1,000,000,000,000 to 1,000,000,000,000)
- Invalid field enum value — must be 'export_amount' or 'import_amount'
- Payment of 0.01 USDC not provided or declined

## How this service works

Trade observations — Category frequencies + Secondary-measure weighted mean: Category frequencies + Secondary-measure weighted mean for supplied trade observations records (export_amount, import_amount). Up to 200 rows; 2 independent reports using shared local analytical engines. No live lookup, prediction, professional assessment or external action. 0.01 USDC includes 2 supplied-data reports for up to 200 rows.

## Output

Returns two reports for the supplied trade records: (1) category frequency counts showing how often each region value appears across the dataset, and (2) a weighted mean of the selected primary field (export_amount or import_amount) using the other measure as the weight — both computed locally up to 200 rows.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "row_id",
     "region",
     "date",
     "export_amount",
     "import_amount"
    ],
    "properties": {
     "date": {
      "type": "string",
      "default": "",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "maxLength": 10
     },
     "region": {
      "type": "string",
      "default": "",
      "maxLength": 80
     },
     "row_id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "export_amount": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     },
     "import_amount": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "date": "2026-10-01",
     "region": "group-a",
     "row_id": "row-1",
     "export_amount": 10,
     "import_amount": 1
    },
    {
     "date": "2026-10-02",
     "region": "group-b",
     "row_id": "row-2",
     "export_amount": 20,
     "import_amount": 2
    },
    {
     "date": "2026-10-03",
     "region": "group-a",
     "row_id": "row-3",
     "export_amount": 15,
     "import_amount": 3
    },
    {
     "date": "2026-10-04",
     "region": "group-b",
     "row_id": "row-4",
     "export_amount": 30,
     "import_amount": 4
    }
   ],
   "maxItems": 200,
   "minItems": 1
  },
  "field": {
   "enum": [
    "export_amount",
    "import_amount"
   ],
   "type": "string",
   "default": "export_amount"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trade-observations-category-frequencies-secondary-measure-weighted-mean-1631e536/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)
