Most COT-Reports.com readers will never need an API. The website covers the daily case; the spreadsheet covers the weekly case. But every so often someone writes to us asking the same thing: “Do you have an API? I want to pipe COT data into [Python / an internal dashboard / a Discord bot / a Notion database].” We do. It is called the COT Data API, and this is what it does.
In one sentence: a REST endpoint that returns the same Commitments of Traders dataset that powers the website and the Excel workbook: bearer-authenticated, JSON, normalized columns, weekly history. $11 per month, cancel any time, access through the period you have paid for. The underlying data is U.S. federal public domain (17 USC §105); what you pay for is the work around it: the cleaned columns, a delivery with published limits, and the OpenAPI 3.0 specification.
Who actually uses an API for COT data?
Three personas, in our experience:
The systematic trader. Runs a positioning model in Python or R. Reads the new CFTC release on Friday afternoon, recomputes the model over the weekend and is ready before Monday’s open. Doesn’t want to write a CFTC scraper or a CSV download routine; wants requests.get(...) and a JSON envelope.
The analyst building a dashboard. Internal team dashboard, Grafana panel, Notion database, custom Tableau report. Pipes the latest COT positioning into a view colleagues already check every day. Needs a stable JSON structure that won’t change underneath them.
The indie tool builder. A Discord bot that posts the new COT release to a server every Friday. A small web page that charts Managed Money positioning next to price. A phone app that sends a notification when positioning reaches the edge of its range. Different surfaces, same data need.
If your workflow looks like any of those, the API exists for you. If you just want to read the report, the website does that for free.
The four endpoints
The API surface is intentionally tight. Four endpoints, each doing one thing, all returning JSON:
GET /api/v1/markets/ — lists every CFTC market in our catalog, with its name, CFTC code, category, exchange, contract units, the report families that publish it and its first and last report dates. Filter with category, family, tracked or search; page with limit and offset. Use it once to find the codes you need, then keep your own list.
GET /api/v1/cot/{cftc_code}/ — weekly history for one market. By default it returns the last 520 weekly reports (about 10 years) of the Legacy report. family=disagg|tff|supp switches to the other CFTC report families; from / to (YYYY-MM-DD) narrow the dates; limit sets how many reports come back.
GET /api/v1/cot/{cftc_code}/latest/ — the most recent report for one market, when you only need the current week, not the whole history. It takes the same family and variant parameters.
GET /api/v1/cot/{cftc_code}/index/ — the COT Index in the Briese style: where the latest net non-commercial position (long minus short) sits between the lowest and the highest net position of a rolling lookback window, on a 0 to 100 scale (100 at the window’s high, 0 at its low, 50 when the window is flat). It is computed on the Legacy report; the default lookback is 52 weeks, adjustable from 4 to 520 with lookback. Built in, so you don’t have to recompute it client-side.
The variant parameter. The CFTC publishes each report in two versions: Futures Only, and Futures & Options Combined. variant=futonly or variant=combined picks one on the history, latest and index endpoints. Left out, each report gives its default: Futures Only for Legacy, Combined for Disaggregated, TFF and Supplemental (Supplemental exists only as Combined). When you ask for a variant, the response names it in a variant field.
Plus a fifth, GET /api/v1/demo/, that returns a fixed synthetic sample with no authentication (10 requests per day per network address). Use it to check your parser before subscribing.
Authentication, rate limits, and the practical bits
Auth is a bearer token: Authorization: Bearer cot_live_<32 hex>. After subscribing you create your keys on the API keys page of your account. We store only a SHA-256 hash of each key, never the key itself, and you can revoke a key from the same page if it leaks.
Limits are 60 requests per minute and 500 requests per day, per key. That is comfortably more than the typical “fetch the latest week for 30 markets every Friday” workflow needs. Every answered request carries X-RateLimit-Remaining headers, so you can slow down before you hit the cap; past it, you get HTTP 429 with a Retry-After header.
Errors come back as a stable envelope: { "error": "<machine_code>", "message": "<human_text>" } with a meaningful HTTP status. The machine code is the part you branch on (unknown_token, rate_limited, no_data, invalid_variant and so on); the human message is for logs.
A minimal example, in three languages
Pulling the latest week for Euro FX (CFTC code 099741) takes about as much code as you’d expect:
Python:
import requests
r = requests.get(
"https://cot-reports.com/api/v1/cot/099741/latest/",
headers={"Authorization": "Bearer cot_live_..."},
)
data = r.json()
print(data["row"]["noncomm_long"])JavaScript / Node:
const res = await fetch(
"https://cot-reports.com/api/v1/cot/099741/latest/",
{ headers: { Authorization: "Bearer cot_live_..." } }
)
const data = await res.json()
console.log(data.row.noncomm_long)Bash / curl:
curl https://cot-reports.com/api/v1/cot/099741/latest/ \
-H "Authorization: Bearer cot_live_..."The OpenAPI 3.0 specification is at /api/v1/openapi.json if you want to generate a client in your language automatically; the API documentation page describes every field.
How it differs from reading the CFTC archive yourself
You could absolutely read the CFTC’s public archive (Socrata, the SODA API) directly: it is public, free and documented. We do exactly that ourselves on the back end. So why pay $11/month for a normalized layer over the same source?
A few reasons people decide it is worth it:
Column names. The CFTC ships its data with stable but messy field names: noncomm_postions_spread_all (with the typo), change_in_noncomm_spead_all (with another), suffixes that come and go across families. Our API returns clean, predictable names: noncomm_long, noncomm_short, comm_long, comm_short. One less thing to maintain.
One naming scheme for all four families. The CFTC publishes Legacy, Disaggregated, TFF and Supplemental as separate datasets, each with its own spelling (Supplemental even returns mixed-case keys). The API names them all the same way: every row has cftc_code, report_date, market_name and open_interest, and every trader group follows one pattern (<group>_long, <group>_short, change_<group>_long, pct_oi_<group>_long). The groups themselves differ, because the reports do: noncomm_long in Legacy, managed_long and swap_long in Disaggregated, dealer_long and asset_mgr_long in TFF. Changing family therefore means reading other group names, not learning other spellings.
Built-in COT Index. The 0 to 100 index is one call instead of a window query you maintain yourself.
Limits you can read. Our limits are published and reported on every answer, and the data comes from our own database, not from the CFTC’s servers. Socrata, the platform behind the CFTC archive, serves requests without an app token from a shared pool per network address and may throttle an address that sends too many (HTTP 429); with a free app token, Socrata says it does not throttle ordinary use.
Maintenance. If the CFTC renames a field, the fix happens on our side, and your code keeps reading the same names.
How it fits next to the spreadsheet and the Data Dump
We sell three data products, and they cover three different workflows:
The COT Report Spreadsheet ($39 one-time) — for the trader who lives in Excel. Open the file, see the latest week, get on with the day. Includes an optional API mode (paste your API key into a config cell, with macros enabled, and its history tab loads from our normalized API).
The COT Data API ($11/month) — for the trader who codes. Any language, any framework, any platform. Bearer-authenticated, published limits, JSON.
The COT Data Dump (from $49, one-time) — for the case where you need the entire historical archive at once. Every market, every family (Legacy from 1986, the others from 2006), in two ZIPs (one per CFTC variant: Futures Only, and Futures & Options Combined), each with a SHA-256 manifest. Backtests, ML training data, offline analysis.
They are intentionally different products at different prices because they serve different uses. Most readers only ever need one. A few buy two: the API plus the spreadsheet (a coded workflow plus Excel comfort), or the API plus the Data Dump (weekly updates plus the full history for backtests). Whatever fits.
Subscribe on the COT Data API page, create your first key in your account, and the demo endpoint will check your setup before you write a single line of production code. Cancel any time; access runs to the end of the month you have paid for, with no commitment.



