COT Guide
A developer's guide to understanding and using CFTC Commitments of Traders data.
What is COT Data?
The Commitments of Traders (COT) report is published weekly by the U.S. Commodity Futures Trading Commission (CFTC). It breaks down the open interest in futures markets by trader category, showing how different types of market participants are positioned.
Systematic commodity traders use COT data as a sentiment and positioning indicator. When speculators are heavily long, the market may be crowded. When commercials are heavily short, producers may be locking in prices they consider favourable.
Report Types
The CFTC publishes several formats of the COT report. This API provides two:
Legacy Report
The original format, available from 1986. Divides traders into two categories:
| Category | Who | Interpretation |
|---|---|---|
| Commercial | Producers, processors, merchants | Hedging physical exposure. Often contrarian -- they sell into rallies and buy dips. |
| Non-Commercial | Funds, CTAs, speculators | Trend-followers. Extreme positioning can signal crowded trades. |
| Non-Reportable | Small traders below reporting thresholds | Derived as total open interest minus reportable categories. |
Disaggregated Report
Available from 2006, providing finer-grained trader categories:
| Category | Description |
|---|---|
| Producer/Merchant | Entities that produce, process, or merchandise the physical commodity |
| Swap Dealer | Dealers using futures to manage swap exposure; often intermediaries |
| Managed Money | CTAs, CPOs, and hedge funds -- the key speculator category to watch |
| Other Reportable | Reportable traders that don't fit the above categories |
Reading the Data
Each COT record includes long, short, and spreading positions for each trader category. The key derived metric is net positioning (long minus short), which shows the directional bias of each group.
{
"report_date": "2024-06-18",
"commodity": "WTI_CRUDE_OIL",
"non_commercial": {
"long": 634567,
"short": 234567,
"spreading": 312345,
"net": 400000
}
}
In this example, non-commercial (speculative) traders hold 400,000 more long contracts than short. A large positive net position indicates bullish speculative sentiment.
Common Use Cases
Positioning Extremes
Compare current net positioning to a historical range (e.g., 3-year percentile). Extreme readings often precede trend reversals. When managed money is at a multi-year high net long, the trade may be crowded.
Week-over-Week Changes
Track how positions are changing. Accelerating long-building by managed money confirms a trend. Rapid unwinding can signal a trend change before price moves.
Commercial vs Speculator Divergence
Commercials tend to be right at extremes. When commercial hedgers are at record short positions while speculators are at record longs, this divergence can be a warning signal.
Example Workflow
Fetch the last 52 weeks of COT data for WTI crude oil and calculate the managed money net position percentile:
import requests
# Fetch 52 weeks of COT data
response = requests.get(
"https://commodityfundamentals.com/api/v1/cftc/reports",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={
"commodity_id": "WTI_CRUDE_OIL",
"format": "disaggregated",
"per_page": 52
}
)
reports = response.json()["data"]
# Calculate managed money net position percentile
nets = [r["managed_money"]["net"] for r in reports]
current = nets[0]
percentile = sum(1 for n in nets if n <= current) / len(nets) * 100
print(f"Current net: {current:,}")
print(f"52-week percentile: {percentile:.0f}%")
curl -X GET "https://commodityfundamentals.com/api/v1/cftc/reports?commodity_id=WTI_CRUDE_OIL&format=disaggregated&per_page=52" \
-H "Authorization: Bearer YOUR_API_KEY"