--- id: openbb-cftc version: "1.4.2" license: AGPL-3.0-only license_treatment: agpl maintenance: active --- # openbb-cftc — The mission of the Commodity Futures Trading Commission (CFTC) is to promote the integrity, resilience, and vibrancy of the U.S. derivatives markets through sound regulation. License: agpl · Maintenance: active · Downloads: 91.1K/mo ## What it is and what it does openbb-cftc is an extension to the OpenBB platform that wraps the CFTC Commitment of Traders database, exposing it through a Python API and optional REST server. It lets you search for commodity contracts by name and retrieve historical open-interest data broken down by trader classification (commercial, non-commercial, managed money, etc.) across different report types. The package depends on openbb-core and openbb-platform-api, integrating into the OpenBB ecosystem as a router module with two endpoints: `cot_search` for finding contracts and `cot` for fetching reports. Data can be returned as DataFrames or accessed via REST. No credentials are required, though an optional free Socrata app_token can be set to avoid IP-based throttling. Use it for: - Search for specific commodity futures contracts (e.g., gold, crude oil) and retrieve their full historical positioning data - Analyze trader sentiment and positioning trends across commercial, non-commercial, and other trader classes - Build dashboards or monitoring systems using the REST API to track open interest and trader classification changes - Compare positioning across different report types (Legacy, Disaggregated, Financial, Supplemental) for the same contract - Integrate CFTC data into quantitative trading or research workflows via Python DataFrames ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides access to CFTC Commitment of Traders data through a Python API and REST interface, enabling queries of historical contract positions by CFTC code. Yes, if you need CFTC Commitment of Traders data and are comfortable with AGPL-3.0 licensing. The package is actively maintained, has low install friction, and integrates cleanly into the OpenBB ecosystem. No known vulnerabilities. Consider it essential for derivatives market analysis; skip it if AGPL licensing conflicts with your project or if you need a standalone tool outside OpenBB. ## Install pip install openbb-cftc uv add openbb-cftc poetry add openbb-cftc ## Installing openbb-cftc Before you install: Low install friction with a pure-Python wheel. Actively maintained as of 51 days ago. Requires running `openbb-build` after installation to set up static assets, and optionally `openbb-api` to start a REST server. License in practice: Licensed under AGPL-3.0-only, which requires derivative works and modifications to be open-sourced under the same license. Suitable for internal tools and open-source projects; review carefully if you plan to distribute proprietary software. Quickstart: pip install openbb-cftc openbb-build from openbb import obb results = obb.cftc.cot_search(query="gold") report = obb.cftc.cot(code="CFTC_088695", measure="percent_of_oi", limit=4) Requires Python 3.10–3.14. Optional: free Socrata account and app_token to avoid IP throttling; set CFTC_APP_TOKEN environment variable if using one. Verify before relying: - Exact throttling behavior and rate limits when using IP address without app_token - Performance characteristics and response times for large historical queries - Whether all four report types (Legacy, Disaggregated, Financial, Supplemental) are fully implemented in this version ## Package facts - License: AGPL-3.0-only (agpl) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 91.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags CFTC commitment of traders data, futures market positioning reports, commodity trader positions API, open interest analysis, CFTC database access, derivatives market data, trader classification reports, cftc-data, futures-market, openbb-extension [View on SkillFed](https://skillfed.io/packages/openbb-cftc) · [View on PyPI](https://pypi.org/project/openbb-cftc/)