Skip to main content
COT-Reports
COT-Reports.com
COT-Reports
Back to all articles
6 min read

The COT Data API — programmatic access to weekly CFTC reports

A REST API for the Commitments of Traders dataset. Bearer auth, JSON responses, four endpoints, $9.99/month. For traders who code, analysts who pipe data into dashboards, and anyone who needs the COT report inside something other than a browser or a spreadsheet.

apideveloperstoolsproduct
The COT Data API — programmatic access to weekly CFTC reports

ost COT-Reports.com readers will never need an API. The website covers the daily case; the spreadsheet covers the weekly case. But once a quarter someone emails us asking the same thing: "Do you have an API? I want to pipe COT data into [Python / a TradingView indicator / an internal dashboard / a Discord bot / a Notion database]." We do. It is called the COT Data API and this is what it does.

The pitch in one sentence: a REST endpoint that returns the same Commitments of Traders dataset that powers the website and the Excel template — bearer-authenticated, JSON-shaped, normalized columns, weekly history. $9.99 per month, cancel any time, access through your billed period. The underlying data is U.S. federal public domain (17 USC §105); what you pay for is the curation, the rate-limited delivery, and the OpenAPI 3.0 spec.

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 Friday afternoon, recomputes signals, pushes orders to the broker Monday morning. Doesn't want to write a CFTC scraper, doesn't want a CSV download workflow, 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 visual their colleagues already check daily. Needs a stable JSON structure that won't change underneath them.

**The indie tool builder.** Discord bot that posts the new COT release in a server every Friday. TradingView Pine Script that overlays Managed Money positioning on the price chart. iOS app that pings when positioning hits an extreme. 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 and act on it, the website does that for free.

The four endpoints

The API surface is intentionally tight. Four endpoints, each doing one thing well, all returning JSON:

**`GET /api/v1/markets`** — list every CFTC market in our normalized catalog. Filterable by category, report family, or tracked-status. Returns market name, CFTC code, exchange, contract units, and which report families publish that market. Use this once to discover what to query, then keep your own list.

**`GET /api/v1/cot/{cftc_code}`** — weekly history for one market. Default returns the last 520 weeks (~10 years) on the Legacy futures-only family. Optional `family=disagg|tff|supp` swaps to the other CFTC report families; `from` / `to` query params narrow the date range; `limit` caps the row count.

**`GET /api/v1/cot/{cftc_code}/latest`** — most recent report for one market. Convenience endpoint when you only need the current week, not the whole history. Same family parameter as above.

**`GET /api/v1/cot/{cftc_code}/index`** — Briese-style COT Index (0-100 percentile of net non-commercial positioning over a rolling lookback window). Default lookback is 52 weeks; configurable from 4 to 520. Built-in so you don't have to recompute it client-side.

Plus a fifth, `GET /api/v1/demo`, that returns a fixed synthetic sample with no auth (10 requests per day per IP). Use it to validate your parser before subscribing.

Authentication, rate limits, and the practical bits

Auth is bearer token: `Authorization: Bearer cot_live_<32 hex>`. You mint a token at /account/api after subscribing — tokens are SHA-256 hashed in the database, never stored in plaintext, and revocable from the same page if a key leaks.

Entry-tier limits are 60 requests per minute and 500 requests per day, per token. That's comfortably more than the typical "fetch the latest week for 30 markets every Friday" workflow needs. We surface the remaining quota in `X-RateLimit-Remaining` headers on every response so you can throttle yourself before hitting the cap.

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 should branch on (`unknown_token`, `rate_limited`, `no_data`, etc.); the human message is for logs.

A minimal example, in three languages

Pulling the latest week for EUR FX (CFTC code 099741) takes about as much code as you'd expect:

**Python:**

```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:**

```javascript 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:**

```bash curl https://cot-reports.com/api/v1/cot/099741/latest \ -H "Authorization: Bearer cot_live_..." ```

The OpenAPI 3.0 spec lives at `/api/v1/openapi.json` if you want to generate clients in your language of choice automatically.

How it differs from scraping the CFTC archive yourself

You absolutely could scrape the CFTC SODA archive directly — it's public, free, and well-documented. We do exactly that ourselves on the back end. So why pay $9.99/month for what amounts to a normalized layer over the same source?

A few reasons people decide it's worth it:

**Column names.** CFTC ships their data with stable but messy field names — `noncomm_postions_spread_all` (with the typo), `change_in_noncomm_spead_all` (with another), inconsistent suffixes across families. Our API returns clean, predictable names: `noncomm_long`, `noncomm_short`, `comm_long`, `comm_short`. One less thing to maintain.

**Cross-family consistency.** The CFTC publishes Legacy, Disaggregated, TFF, and Supplemental as four separate datasets with four separate column conventions. The API normalizes all four to the same shape, so swapping `family=legacy` for `family=disagg` doesn't break your code.

**Built-in COT Index.** The Briese 0-100 percentile is a one-line endpoint instead of a window-function query you maintain yourself.

**Rate-limited delivery.** When you hit our endpoint, you're reading from our cache, not from CFTC's servers. CFTC SODA throttles aggressively under load — your scraper can fail right when you need it most. Our API doesn't.

**Maintenance.** When CFTC changes a column name (and they do, every few years), the breakage happens on our side. Your code keeps working.

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 optional API mode (paste your API token into a config cell and the workbook switches to our normalized API for cleaner data).

**The COT Data API ($9.99/month)** — for the trader who codes. Use any language, any framework, any platform. Bearer-authenticated, rate-limited, JSON.

**The COT Data Dump ($49 one-time)** — for the case where you need the entire historical archive at once. Every market, every family, 1986 to today, in a single ZIP with a SHA-256 manifest. Backtests, ML training data, offline analysis.

They're intentionally different products with different price points because they serve different use cases. Most readers only ever need one. A few power users buy two: API plus spreadsheet (live workflow + Excel ergonomics), or API plus Data Dump (live signals + historical backtesting). Whatever fits.

Subscribe to the API at /api on the main site, mint your first token at /account/api, and the demo endpoint will validate your setup before you write a single line of production code. Cancel any time, access through the end of your billed month, no commitment.

End of article

Thanks for reading. If this was useful, the Telegram channel and the weekly newsletter are the easiest ways to catch the next one when it lands.

Share:
Back to all articles

Keep reading

Two more notes from the editors.

Stay close to the data

Friday afternoons, in your inbox.

Every Friday at 3:30 PM Eastern, the new CFTC release lands and we post the full Weekly Summary to the Telegram channel. Join 12,000+ traders who already follow along — or use the newsletter for a deeper read.

Join the channel

Get Weekly COT Alerts

One short email every Friday with the new CFTC release, top market moves and the next week's calendar. No spam, unsubscribe anytime.

Every FridayCFTC DataMarket MovesFree

By subscribing you agree to our Terms & Privacy Policy.