-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Victor Kaiuki edited this page Jun 20, 2026
·
2 revisions
-
0 rows: Market names are ALL CAPS in the API. SDK
market()helper handles this automatically, but if usingwhere()raw, uppercase your search string. -
400 Bad Request: Field name mismatch. Use
fields.pyconstants. -
403 Forbidden: Rate limit. Use
COTClient(app_token="..."). - Classification Error: Wrong helper method for dataset type.
- Missing columns: TFF has fewer columns than Legacy/Disaggregated. Check dataset type.
-
COTConnectionError: The API failed repeatedly (429/5xx) and retries were exhausted. Add anapp_tokento lift rate limits, or raisemax_retries/backoff_baseonCOTQuery. -
Disk cache error:
cache="disk"requires the optional dependency —pip install cftc-cot-soda[cache]. -
NaNCOT Index / Z-scores at the start: Rolling metrics need history to fill the window; early rows areNaNby design. Fetch more weeks than the window size. -
COT Index mixes contracts:
market()is a prefix match; a broad term can match several markets. Use a more specific name ormarket(name, exact=True).
Getting Started
API Reference
Field Reference
Guides
Reference