-
Notifications
You must be signed in to change notification settings - Fork 0
CLI
Victor Kaiuki edited this page Jun 20, 2026
·
1 revision
Installing the package registers the cftc-cot command for quick lookups without
writing Python.
cftc-cot --help| Command | Description |
|---|---|
latest |
Latest report for a market. |
history |
N-week history for a market. |
markets |
List available markets for a dataset. |
index |
COT Index history for a market. |
cftc-cot latest --dataset legacy --market "Crude Oil"
cftc-cot history --dataset legacy --market "Crude Oil" --weeks 52
cftc-cot markets --dataset legacy
cftc-cot index --dataset legacy --market "Crude Oil" --window 156 --weeks 156These apply to every subcommand and may be placed before or after the subcommand:
| Option | Choices / default | Description |
|---|---|---|
--app-token |
— | Socrata API app token for higher rate limits. |
--cache |
memory, disk
|
Enable response caching. |
--format |
table (default), csv, json
|
Output format. |
# Equivalent invocations:
cftc-cot --format json latest --dataset legacy --market "Gold"
cftc-cot latest --dataset legacy --market "Gold" --format json
# JSON output, in-memory cache:
cftc-cot --cache memory --format json history --dataset legacy --market "Gold" --weeks 26-
--marketis a case-insensitive prefix match, so a broad term like"Crude Oil"may match several contracts. Use a more specific name to narrow the result. - The
indexcommand fetches--weeksof history (default 156) and computes the COT Index with the given--window. See COTAnalysis for the formula.
Getting Started
API Reference
Field Reference
Guides
Reference