# Gloom COT (Commitments of Traders) Data by Contract

> Gloom COT (Commitments of Traders) Data by Contract is a paid API for AI agents from api.gloom.sh, paid per call via x402, $0.06/call, status unknown (last checked 2026-11-01).

Returns CFTC Commitments of Traders (COT) report data for a specific futures contract, including long/short/spreading positions by trader category and open interest.

## Facts

- Endpoint: GET https://api.gloom.sh/v1/cot/%7BcontractCode%7D?utm_source=zero.xyz
- Price: $0.06/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gloom-cot-commitments-of-traders-data-by-contract-8eca9044
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iiVOusFiAYQi_GLEcTIYb

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 gloom-cot-commitments-of-traders-data-by-contract-8eca9044
```

Example prompt: Can you pull the latest Commitments of Traders report for contract code 000001 and show me the noncommercial long, short, and net positions along with total open interest?

## When to prefer this

Use this endpoint when you need structured, machine-readable CFTC Commitments of Traders data for a specific futures contract, broken down by trader category (noncommercial, commercial, etc.), and want to avoid scraping the CFTC website manually. It is ideal for quantitative analysis of speculator positioning, open interest trends, and market sentiment in commodity and financial futures markets.

## Known failure modes

- Invalid or unknown contractCode returns an error or empty data
- Contract code for a non-futures instrument may return no results or scope mismatch
- Payment failure (x402) if USDC balance is insufficient — returns 402 status
- Rate limiting if too many requests are made in quick succession
- Data may be delayed or unavailable if CFTC has not yet published the latest weekly report

## How this service works

Gloom is a free, open-source finance terminal for desktop and TUI with charts, news, filings, portfolios, alerts, and plugins.

## Output

A JSON object containing the COT report for the requested contract, including: report scope (e.g. futures-only), contract metadata (contractCode, exchangeCode, commodityCode), an array of trader-category position objects (each with id, label, net, long, short, spreading values), total open interest, report family (e.g. legacy), and an optional sourceUrl linking to the original CFTC filing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "scope": "futures-only",
   "contract": {
    "contractCode": "000001",
    "exchangeCode": "ILLUSTRATIVE",
    "commodityCode": "ILLUSTRATIVE"
   },
   "positions": [
    {
     "id": "noncommercial",
     "net": 100,
     "long": 300,
     "label": "Noncommercial",
     "short": 200,
     "spreading": 0
    }
   ],
   "sourceUrl": null,
   "openInterest": 1000,
   "reportFamily": "legacy"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gloom-cot-commitments-of-traders-data-by-contract-8eca9044/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gloom.sh](https://www.zero.xyz/host/api.gloom.sh/llms.txt)
