Skip to main content

forexia-cot

The CFTC's weekly Commitments of Traders (COT) report for FX futures, the US dollar index and gold: positions only (long, short, net, net as a share of open interest), legacy and TFF reports, weekly since 2010. Reads the files of github.com/ForexiaPro/cot-data, updated every Friday after the CFTC's release.

Standard library only. pandas is optional.

pip install forexia-cot
forexia-cot          # this week's table: net non-commercial, weekly change, % of open interest
forexia-cot gbp      # the pound's last eight weeks
import forexia_cot as cot

cot.get_cot("EUR")                       # every legacy report since 2010, oldest first (a list of dicts)
cot.get_cot("USDJPY", report="tff")      # the yen future's TFF groups
cot.get_cot("gold", since="2024-01-01")
cot.latest()                             # this week, every market and group

df = cot.cot_frame("EUR")                # pip install "forexia-cot[pandas]"
df.noncommercial_net.plot()

Markets: EUR, GBP, JPY, CHF, CAD, AUD, NZD, MXN, USD (the dollar index), XAU (gold; legacy only). EURUSD, USDJPY, gold and DXY work too.

Columns: date (the Tuesday the positions were counted), open_interest, then for each group _long, _short, _net, _net_pct_oi (net as a share of open interest, in per cent); non-commercial also has _spreading. Legacy groups: noncommercial, commercial, nonreportable. TFF groups: dealer, asset_manager, leveraged_funds, other_reportable, nonreportable. Positions are contracts in the future's terms: long JPY is long the yen, so short USDJPY.

For Forexia's COT index and weekly reading of these positions, see forexiapro.com/cot-report.

Licence

The code is MIT. The figures are the CFTC's Commitments of Traders (public domain), compiled by Forexia: forexiapro.com/cot-report.


Part of the Forexia network: InterestRateDecision.com · Forexia Academy · TradingSignalBot · PropSim · OpenCharts

Metadata

Release files for forexia-cot 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forexia-cot 1.0.0
File Size Uploaded Provenance Actions
forexia_cot-1.0.0.tar.gz 7.9 kB Without provenance Details for forexia_cot-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for forexia-cot 1.0.0
File Interpreter ABI Platform Actions
forexia_cot-1.0.0-py3-none-any.whl Python 3 none any Details for forexia_cot-1.0.0-py3-none-any.whl

Total release size: 13.8 kB

Release files / forexia_cot-1.0.0.tar.gz

Download URL forexia_cot-1.0.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6dccb79f91603978f437c9ff78129473889868816de22e4d2938ca4ddbf8f57
BLAKE2b-256 checksum
How to use checksums
2bee5bead4bbcc4935e7c4961f429f81d7625aadb62bea5c1cf956c11109d4a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / forexia_cot-1.0.0-py3-none-any.whl

Download URL forexia_cot-1.0.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb79938e03525d77caf94b90e4ef1a0038373d9894e5381a74280791c7558ed1
BLAKE2b-256 checksum
How to use checksums
3d311e1b93bb5df61696afc3364c647ecf2f82aa70e8be793b043b22e3f83f2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for forexia-cot 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page