COT Data API CFTC positioning for metals as JSON
The CFTC's disaggregated Commitments of Traders positions for the COMEX and NYMEX metals contracts, one row per weekly report. Gold, silver, platinum and palladium go back to January 2013.
- Managed money, producer and merchant, swap dealer and other reportable positions, each long, short and net
- Spreading and open interest on every report
- Gold, silver, copper, platinum and palladium from one endpoint
- Included from Pro ($99 a month)
GET /v1/cot?metal=XAU&range=1Y
curl -H "Authorization: Bearer mc_live_YOUR_KEY" \
"https://api.metalcharts.org/v1/cot?metal=XAU&range=1Y"A year of weekly gold positioning. metal takes XAU, XAG, HG, XPT or XPD, and range takes 1M, 3M, YTD, 1Y, 5Y, 10Y or ALL.
2013
Weekly reports from
5
Metals contracts
Weekly
One row per CFTC report
Pro
Plan that includes it
Endpoints
COT Data API endpoints
Every endpoint below needs Pro ($99 a month) or higher. Requests use the same key and bearer header as the rest of the API.
| Endpoint | Returns | From |
|---|---|---|
| GET/v1/cot | Commitments of Traders positioning history for a metal | Pro |
Response
What /v1/cot returns
Field names exactly as the API sends them, from the published OpenAPI specification.
| Field | Meaning |
|---|---|
| reportDate | The Tuesday the positions are measured on |
| mmLong, mmShort, mmSpreading, mmNet | Managed money: hedge funds and commodity trading advisers |
| pmLong, pmShort, pmNet | Producers, merchants, processors and users |
| sdLong, sdShort, sdSpreading, sdNet | Swap dealers |
| orLong, orShort, orSpreading, orNet | Other reportable traders |
| nrLong, nrShort, nrNet | Non-reportable positions, the traders below the CFTC's reporting threshold |
| openInterest | Total open interest in the contract |
| cftcContractCode, marketName | The CFTC's own identifiers for the contract |
Code
Call it from Python or JavaScript
No SDK to install: an HTTPS GET with your key in the Authorization header.
Python
import requests
resp = requests.get(
"https://api.metalcharts.org/v1/cot?metal=XAU&range=1Y",
headers={"Authorization": "Bearer mc_live_YOUR_KEY"},
timeout=10,
)
resp.raise_for_status()
print(resp.json()["data"])JavaScript
const resp = await fetch("https://api.metalcharts.org/v1/cot?metal=XAU&range=1Y", {
headers: { Authorization: "Bearer mc_live_YOUR_KEY" },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const { data } = await resp.json();
console.log(data);FAQ
COT Data API questions
Which COT report is this?
The CFTC's disaggregated Commitments of Traders report, which splits traders into producers and merchants, swap dealers, managed money and other reportables, with non-reportable positions alongside. Each row is one weekly report for one contract.
How far back does the COT history go?
Gold, silver, platinum and palladium go back to the report of 8 January 2013. range=ALL (or MAX) returns the whole series; the default is one year.
When does new positioning arrive?
The CFTC measures positions as of Tuesday and publishes them on Friday afternoon, US Eastern time, so each week's row appears after that release.
Do I need to compute net positions myself?
No. Every category carries its net figure (mmNet, pmNet, sdNet, orNet, nrNet) next to long and short.
On metalcharts.org
See the same data as charts
More data
Other exchange data, same API
Start with Pro
COT Data data is included from Pro ($99 a month). Every plan, Free included, can call the live price endpoints.