# DataNexusAI Trade Balance API

> DataNexusAI Trade Balance API is a paid API for AI agents from api.datanexusai.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-02).

Retrieves trade balance data for a given country and commodity, optionally filtered by partner and date range, via USDC micropayment.

## Facts

- Endpoint: GET https://api.datanexusai.org/api/v1/trade/balance?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/datanexusai-trade-balance-api-7000cb0d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t_pT8HWCMKGomyTu2Rslb

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 datanexusai-trade-balance-api-7000cb0d
```

Example prompt: Pull the trade balance for Bulgaria (country code BG) for commodity 1001 (wheat) with partner WORLD from January 2022 to December 2023.

## When to prefer this

Use this endpoint when you need structured, machine-readable international trade balance data for a specific country-commodity pair, particularly for EU-adjacent or agricultural trade analytics. Prefer this over generic statistics portals when you need programmatic access with micropayment-based pricing and no subscription overhead.

## Known failure modes

- Missing required 'country' or 'commodity' query parameters returns a 400 or validation error
- Invalid country or commodity code returns no results or an error response
- Payment not provided or insufficient USDC results in HTTP 402 Payment Required
- Date range with no available data may return empty result set
- Unsupported HTTP method (e.g. POST) returns 405 Method Not Allowed

## How this service works

Public data API for SEBRA payments, PTP road accidents, Hearthstone cards, EU agri-food prices, and trade/market analytics. Paid data endpoints use x402 (USDC micropayments). Docs and discovery endpoints are free.

Machine-readable discovery: `https://api.datanexusai.org/openapi.json`, `https://api.datanexusai.org/llms.txt`, `https://api.datanexusai.org/.well-known/x402`.

Human docs: `/docs` and `/api/`.

## Output

Returns trade balance data for the specified reporter country and commodity, including import and export figures, possibly broken down by partner and time period. Results reflect official trade statistics for the queried product code and country combination.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country",
      "commodity"
     ],
     "properties": {
      "country": {
       "type": "string",
       "example": "BG",
       "description": "Reporter (or reporter=)."
      },
      "date_to": {
       "type": "string",
       "description": "End period."
      },
      "partner": {
       "type": "string",
       "description": "Partner (default WORLD)."
      },
      "commodity": {
       "type": "string",
       "example": "1001",
       "description": "Product (or product=)."
      },
      "date_from": {
       "type": "string",
       "description": "Start period."
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/datanexusai-trade-balance-api-7000cb0d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.datanexusai.org](https://www.zero.xyz/host/api.datanexusai.org/llms.txt)
