Sources › Finance › CFTC › Legacy

CFTC Legacy API

Commitments of Traders, legacy report — the non-commercial / commercial split.

CFTCGET /legacyAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/finance:cftc/legacy

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 6 hours.

Parameters

NameTypeInRequiredDescription
marketstringqueryNoMatch against the contract name (case-insensitive substring). Example: GOLD
codestringqueryNoExact CFTC contract market code. The `markets` endpoint lists codes by commodity group. Example: 088691
fromstringqueryNoEarliest report date, YYYY-MM-DD. History runs from 1986-01-15. Example: 2026-01-01
tostringqueryNoLatest report date, YYYY-MM-DD Example: 2026-08-11
combinedenum: true | falsequeryNo`true` for the futures-and-options combined report, `false` (default) for futures only. Example: false
fieldsstringqueryNoComma-separated column groups: `positions`, `changes`, `percent`, `traders`, `concentration`, `maturity`. Default `positions`. Use `all` for every one of the 130 published columns — slower and much larger. Example: positions,traders
pagenumberqueryNoPage number, 1-based. Default 1 Example: 1
lengthnumberqueryNoRows per page (default 50, max 1000) Example: 50

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/finance:cftc/legacy?market=GOLD&code=088691&from=2026-01-01&to=2026-08-11&combined=false&fields=positions%2Ctraders&page=1&length=50" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/finance:cftc/legacy?market=GOLD&code=088691&from=2026-01-01&to=2026-08-11&combined=false&fields=positions%2Ctraders&page=1&length=50", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/finance:cftc/legacy",
    params={"market":"GOLD","code":"088691","from":"2026-01-01","to":"2026-08-11","combined":"false","fields":"positions,traders","page":"1","length":"50"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "finance:cftc",
  "data": {
    "to": null,
    "code": null,
    "from": null,
    "page": 1,
    "count": 50,
    "items": [
      {
        "code": "001602",
        "date": "2026-08-11",
        "units": "(CONTRACTS OF 5,000 BUSHELS)",
        "market": "WHEAT-SRW",
        "exchange": "WHEAT-SRW - CHICAGO BOARD OF TRADE",
        "commodity": "WHEAT",
        "openInterest": 475566,
        "commercialNet": 22754,
        "commercialLong": 171852,
        "commercialShort": 149098,
        "nonCommercialNet": -24910,
        "nonCommercialLong": 114979,
        "nonReportableLong": 38571,
        "nonCommercialShort": 139889,
        "nonReportableShort": 36415,
        "nonCommercialSpread": 150164,
        "totalReportableLong": 436995,
        "totalReportableShort": 439151
      },
      {
        "code": "001612",
        "date": "2026-08-11",
        "units": "(CONTRACTS OF 5,000 BUSHELS)",
        "market": "WHEAT-HRW",
        "exchange": "WHEAT-HRW - CHICAGO BOARD OF TRADE",
        "commodity": "WHEAT",
        "openInterest": 305725,
        "commercialNet": -15074,
        "commercialLong": 115155,
        "commercialShort": 130229,
        "nonCommercialNet": 13214,
        "nonCommercialLong": 71932,
        "nonReportableLong": 22400,
        "nonCommercialShort": 58718,
        "nonReportableShort": 20540,
        "nonCommercialSpread": 96238,
        "totalReportableLong": 283325,
        "totalReportableShort": 285185
      },
      {
        "code": "001626",
        "date": "2026-08-11",
        "units": "(CONTRACTS OF 5,000 BUSHELS)",
        "market": "WHEAT-HRSpring",
        "exchange": "WHEAT-HRSpring - MIAX FUTURES EXCHANGE",
        "commodity": "WHEAT",
        "openInterest": 81898,
        "commercialNet": -10589,
        "commercialLong": 47611,
        "commercialShort": 58200,
        "nonCommercialNet": 9659,
        "nonCommercialLong": 19038,
        "nonReportableLong": 8649,
        "nonCommercialShort": 9379,
        "nonReportableShort": 7719,
        "nonCommercialSpread": 6600,
        "totalReportableLong": 73249,
        "totalReportableShort": 74179
      },
      {
        "code": "002602",
        "date": "2026-08-11",
        "units": "(CONTRACTS OF 5,000 BUSHELS)",
        "market": "CORN",
        "exchange": "CORN - CHICAGO BOARD OF TRADE",
        "commodity": "CORN",
        "openInterest": 1684065,
        "commercialNet": -198128,
        "commercialLong": 701619,
        "commercialShort": 899747,
        "nonCommercialNet": 244912,
        "nonCommercialLong": 486272,
        "nonReportableLong": 136706,
        "nonCommercialShort": 241360,
        "nonReportableShort": 183490,
        "nonCommercialSpread": 359468,
        "totalReportableLong": 1547359,
        "totalReportableShort": 1500575
      },
      {
        "code": "005602",
        "date": "2026-08-11",
        "units": "(CONTRACTS OF 5,000 BUSHELS)",
        "market": "SOYBEANS",
        "exchange": "SOYBEANS - CHICAGO BOARD OF TRADE",
        "commodity": "SOYBEANS",
        "openInterest": 982903,
        "commercialNet": -139634,
        "commercialLong": 470771,
        "commercialShort": 610405,
        "nonCommercialNet": 159945,
        "nonCommercialLong": 252585,
        "nonReportableLong": 46683,
        "nonCommercialShort": 92640,
        "nonReportableShort": 66994,
        "nonCommercialSpread": 212864,
        "totalReportableLong": 936220,
        "totalReportableShort": 915909
      },
      {
        "code": "005603",
        "date": "2026-08-11",
        "units": "(Contracts of 1,000 Bushels)",
        "market": "MINI SOYBEANS",
        "exchange": "MINI SOYBEANS - CHICAGO BOARD OF TRADE",
        "commodity": "SOYBEANS",
        "openInterest": 26470,
        "commercialNet": -11152,
        "commercialLong": 7,
        "commercialShort": 11159,
        "nonCommercialNet": 20151,
        "nonCommercialLong": 21792,
        "nonReportableLong": 4282,
        "nonCommercialShort": 1641,
        "nonReportableShort": 13281,
        "nonCommercialSpread": 389,
        "totalReportableLong": 22188,
        "totalReportableShort": 13189
      }
    ],
    "total": 287411,
    "fields": [
      "positions"
    ],
    "market": null,
    "dataset": "legacy",
    "hasMore": true,
    "combined": false,
    "nextPage": 2,
    "provider": "cftc"
  },
  "timestamp": "2026-08-08T10:10:23Z"
}

Frequently asked questions

How do I call the CFTC Legacy API?

Send a GET request to https://api.zapi.ink/v1/finance:cftc/legacy with your Zapi key in the x-api-key header. Parameters — optional: market, code, from, to, combined, fields, page, length. The response is JSON in the { project, data, timestamp } envelope.

What does the CFTC Legacy API return?

Commitments of Traders, legacy report — the non-commercial / commercial split. The example response has the fields to, code, from, page, count, items, total, fields. Each item in items has fields such as code, date, units, market, exchange, commodity, openInterest, commercialNet.

Is the CFTC Legacy API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the CFTC Legacy API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "cftc" and endpoint "legacy".

What other CFTC API endpoints are there?

It has 2 endpoints. Besides Legacy: Commitments of Traders.