# CFTC COT Report – Commitments of Traders & COT Index (`gazidev/cftc-cot-report`) Actor

Official CFTC Commitments of Traders data (legacy, disaggregated, TFF) for gold, oil, FX, indices, rates, crypto and more: net positions, weekly changes, COT index (26/52/156 weeks) and positioning alerts. Pay per row.

- **URL**: https://apify.com/gazidev/cftc-cot-report.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 cot report rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## CFTC COT Report – Commitments of Traders Data, Net Positions & COT Index (API)

Get the **official CFTC Commitments of Traders (COT) report** as clean JSON: who is long and short gold, crude oil, euro,
yen, S\&P 500 futures, Treasuries, bitcoin and 370+ other US futures markets, every week since 1986. On top of the raw
numbers the Actor computes the **net position of each trader group, week-over-week change, % of open interest and the
COT Index** (0-100 over 26, 52, 156 or any number of weeks), and can return **only the markets with positioning alerts**.

Data comes straight from the CFTC Public Reporting Environment (the regulator's own API). No scraping of third-party
COT sites. **$0.50 per 1,000 rows.**

### What you get

- **All three COT reports**, futures-only or futures + options combined:
  - **Legacy**: Non-commercial (large speculators), Commercial (hedgers), Non-reportable (small traders). All markets.
  - **Disaggregated**: Managed Money, Producer/Merchant, Swap Dealers, Other Reportables. Commodities.
  - **Traders in Financial Futures (TFF)**: Leveraged Funds, Asset Managers, Dealers, Other. FX, indices, rates, crypto.
- **Per market-week row:** report date, market, exchange, CFTC code, commodity (group/subgroup in disaggregated), open
  interest and its change, and for **every trader class**: long, short, spreading, **net**, **net change**, net % of OI,
  long/short % of OI and **COT Index**.
- **Headline columns** for quick screens: `speculatorNet`, `speculatorNetChange`, `speculatorCotIndex` (Managed Money /
  Non-commercial / Leveraged Funds) and `hedgerNet`, `hedgerCotIndex` (Producer-Merchant / Commercial / Dealer).
- **Alerts** on every row: COT index at an extreme (default >= 90 or <= 10), speculators **flipping net long/short**,
  or a weekly net change bigger than X% of open interest. `mode: "alerts"` returns only those rows.
- **Market groups** (presets): major FX, metals, energy, equity indices, rates, crypto, grains, softs, livestock.

### Use cases

- Weekly positioning dashboards for forex, commodity and index traders ("are funds crowded long gold?").
- n8n / Make / Zapier flows: every Saturday, send a Slack or Telegram message with markets where speculators hit a
  1-year extreme or flipped sides.
- Quant research and backtests: decades of weekly COT history with the COT index already computed.
- Newsletters and market commentary, AI agents answering "what is the hedge fund positioning in crude oil?".

### Input example

```json
{
  "report": "disaggregated",
  "futuresOnly": true,
  "markets": ["GOLD - COMMODITY EXCHANGE", "CRUDE OIL, LIGHT SWEET"],
  "weeks": 8,
  "mode": "history",
  "maxItems": 20
}
```

- `markets`: name fragments as written by the CFTC (`GOLD - COMMODITY EXCHANGE`, `WTI-PHYSICAL`, `EURO FX`, `E-MINI S&P 500`)
  or 6-character contract codes (`088691` gold, `067651` NYMEX WTI, `099741` euro FX, `13874A` E-mini S\&P 500). A name
  fragment matches every market containing it (e.g. `GOLD - COMMODITY EXCHANGE` also matches Micro Gold); use codes for
  an exact pick.
- `presets`: `major-fx`, `metals`, `energy`, `equity-indices`, `rates`, `crypto`, `grains`, `softs`, `livestock`.
- `mode`: `latest` (newest report, one row per market), `history` (every week), `alerts` (only alert rows).
- `weeks` or `dateFrom` / `dateTo`; `cotIndexWeeks` (default 52); alert thresholds `alertCotIndexHigh`, `alertCotIndexLow`,
  `alertNetChangePctOI`, `alertOnNetFlip`; `minOpenInterest` to skip illiquid markets; `maxItems`.

Weekly alert scan of all markets:

```json
{"report": "legacy", "futuresOnly": false, "mode": "alerts", "weeks": 1, "minOpenInterest": 20000}
```

### Output example (shortened)

```json
{
  "reportDate": "2026-10-20",
  "market": "GOLD - COMMODITY EXCHANGE INC.",
  "contractCode": "088691",
  "openInterest": 402279,
  "speculatorClass": "managedMoney",
  "speculatorNet": 104206,
  "speculatorNetChange": -2883,
  "speculatorNetPctOI": 25.9,
  "speculatorCotIndex": 26.3,
  "hedgerClass": "producerMerchant",
  "hedgerNet": -14783,
  "hedgerCotIndex": 89.1,
  "alerts": [],
  "managedMoneyLong": 120970,
  "managedMoneyShort": 16764,
  "managedMoneySpreading": 38634,
  "swapDealerNet": -220799,
  "cotIndexLookbackWeeks": 52,
  "sourceUrl": "https://publicreporting.cftc.gov/d/72hh-3qpy"
}
```

The dataset has two views: **COT positioning** (headline table) and **Alerts**. The key-value store `OUTPUT` holds a run summary.

**COT Index** = (current net - lowest net in the lookback) / (highest net - lowest net) x 100, per trader class, computed
from the CFTC's weekly series. 100 = most net long in the lookback, 0 = most net short.

### Pricing

Pay per event, no subscription:

| Event | Price |
|---|---|
| Actor start | $0.00005 |
| COT row (latest / history mode) | $0.0005 |
| Alert row (alerts mode) | $0.002 |

| Actor (Apify Store, Oct 2026) | Price per row | COT index | Alerts | Reports |
|---|---|---|---|---|
| **This Actor** | **$0.0005** | yes (any lookback, every class) | yes | legacy, disaggregated, TFF; futures or combined |
| scrapemint/cftc-cot-tracker | $0.004 | - | - | - |
| jungle_synthesizer/cftc-cot-positions-scraper | $0.001 | - | - | - |
| pepeschuster/cftc-cot-legacy-api | $0.005 | - | - | legacy only |

The first 8 weeks of gold + crude (prefill) cost about $0.01. A weekly alert scan of all liquid markets costs a few cents.
Invalid input and source errors are saved as free rows.

### FAQ

**When is new data available?** The CFTC publishes COT data every Friday 3:30 p.m. ET for positions as of the preceding
Tuesday (`reportDate`). Holidays and government shutdowns can delay releases. Schedule the Actor on Saturdays.

**Why does a name match several markets?** Matching is "name contains". Use the CFTC code to pick one contract.
Codes are shown in every row (`contractCode`).

**Why are my FX markets missing in the disaggregated report?** The disaggregated report covers physical commodities only.
Use `tff` or `legacy` for currencies, indices, rates and crypto.

**Is the data licensed?** COT reports are works of the US federal government (public domain, 17 U.S.C. §105). The Actor
uses the CFTC's public API with a contact User-Agent and keeps at least 1 second between requests (robots.txt crawl delay).

**How far back?** Legacy since 1986, disaggregated and TFF since 2006. Long ranges: use `dateFrom` / `dateTo`.

### Use with AI agents (Apify MCP)

Add the Actor to Claude, Cursor or any MCP client through the Apify MCP server (`https://mcp.apify.com`) and ask, for
example, "Which commodity markets have managed money at a 52-week extreme this week?" or "Show the last 12 weeks of
leveraged-fund positioning in the yen". The agent calls this Actor with `mode`, `presets` and `weeks` and gets compact JSON.

### Related Actors

- Official Economic Calendar (US, EU, UK release dates) by gazidev.

Data source: U.S. Commodity Futures Trading Commission, Commitments of Traders. This Actor is not affiliated with the CFTC.

# Actor input Schema

## `report` (type: `string`):

Legacy = Commercial / Non-commercial / Non-reportable (all markets). Disaggregated = Producer-Merchant / Swap Dealer / Managed Money / Other (commodities only). TFF (Traders in Financial Futures) = Dealer / Asset Manager / Leveraged Funds / Other (FX, indices, rates, crypto).

## `futuresOnly` (type: `boolean`):

On = futures-only report. Off = futures and options combined report.

## `markets` (type: `array`):

Market name fragments as CFTC writes them (e.g. 'GOLD - COMMODITY EXCHANGE', 'WTI-PHYSICAL', 'EURO FX', 'E-MINI S\&P 500') or 6-character CFTC contract codes (e.g. 088691 gold, 067651 WTI, 099741 euro). Leave empty together with presets to get every market.

## `presets` (type: `array`):

Ready-made groups of flagship contracts. FX, equity indices, rates and crypto are in the legacy and TFF reports; metals, energy, grains, softs and livestock in legacy and disaggregated.

## `mode` (type: `string`):

latest = newest report only (one row per market). history = every week in the range. alerts = only market-weeks that trigger an alert (extreme COT index, net position flip, big weekly net change).

## `weeks` (type: `integer`):

Number of most recent weekly reports to return in history/alerts mode (1 = newest only; use 1 for a weekly alert flow). Ignored when Date from is set.

## `dateFrom` (type: `string`):

Optional first report date (YYYY-MM-DD). Data goes back to 1986 (legacy) / 2006 (disaggregated, TFF).

## `dateTo` (type: `string`):

Optional last report date (YYYY-MM-DD). Default: newest report.

## `cotIndexWeeks` (type: `integer`):

COT index = (net - min net) / (max net - min net) x 100 over this many weeks, per trader class. Common: 26, 52, 156 (3 years).

## `alertCotIndexHigh` (type: `integer`):

Alert when the speculator or hedger COT index is at or above this value.

## `alertCotIndexLow` (type: `integer`):

Alert when the speculator or hedger COT index is at or below this value.

## `alertNetChangePctOI` (type: `integer`):

Alert when the speculator net position moved by at least this % of open interest in one week. 0 = off.

## `alertOnNetFlip` (type: `boolean`):

Alert when the speculator net position crosses zero.

## `minOpenInterest` (type: `integer`):

Skip small/illiquid markets below this open interest (contracts). Useful for all-market alert scans, e.g. 20000.

## `maxItems` (type: `integer`):

Maximum rows saved (and charged). 0 = no limit.

## Actor input object example

```json
{
  "report": "disaggregated",
  "futuresOnly": true,
  "markets": [
    "GOLD - COMMODITY EXCHANGE",
    "CRUDE OIL, LIGHT SWEET"
  ],
  "mode": "history",
  "weeks": 8,
  "cotIndexWeeks": 52,
  "alertCotIndexHigh": 90,
  "alertCotIndexLow": 10,
  "alertNetChangePctOI": 5,
  "alertOnNetFlip": true,
  "minOpenInterest": 0,
  "maxItems": 20
}
```

# Actor output Schema

## `positioning` (type: `string`):

No description

## `alerts` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "report": "disaggregated",
    "markets": [
        "GOLD - COMMODITY EXCHANGE",
        "CRUDE OIL, LIGHT SWEET"
    ],
    "mode": "history",
    "weeks": 8,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/cftc-cot-report").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "report": "disaggregated",
    "markets": [
        "GOLD - COMMODITY EXCHANGE",
        "CRUDE OIL, LIGHT SWEET",
    ],
    "mode": "history",
    "weeks": 8,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("gazidev/cftc-cot-report").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "report": "disaggregated",
  "markets": [
    "GOLD - COMMODITY EXCHANGE",
    "CRUDE OIL, LIGHT SWEET"
  ],
  "mode": "history",
  "weeks": 8,
  "maxItems": 20
}' |
apify call gazidev/cftc-cot-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/cftc-cot-report"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HfarQvWEmEB6tC60J/builds/dWPyiSOHo09XXt4b6/openapi.json
