Skip to content

COTClient

Victor Kaiuki edited this page Jun 16, 2026 · 1 revision

COTClient

The COTClient is the main entry point for the SDK.

from cftc_cot import COTClient

# Initialize (unauthenticated, rate-limited)
client = COTClient()

# Initialize with API token (recommended for higher limits)
client = COTClient(app_token="YOUR_TOKEN")

Factory Methods (returns COTQuery instances)

  • client.legacy(): Legacy Combined
  • client.legacy_futures(): Legacy Futures Only
  • client.disaggregated(): Disaggregated Combined
  • client.disaggregated_futures(): Disaggregated Futures Only
  • client.tff(): TFF Combined
  • client.tff_futures(): TFF Futures Only

Convenience Methods

  • client.latest(dataset, market): Fetch latest row.
  • client.history(dataset, market, weeks=52): Fetch historical data.
  • client.list_markets(dataset): Return unique list of all available markets.

Clone this wiki locally