get_source_data_cftc_cot: Retrieve CFTC Commitments Of Traders Data

View source: R/cftc_cot_data.R

get_source_data_cftc_cotR Documentation

Retrieve CFTC Commitments Of Traders Data

Description

Retrieves TFF, Disaggregated, or Legacy reports from the CFTC Public Reporting Environment.

Usage

get_source_data_cftc_cot(
  report_variant = c("futures_only", "combined"),
  report_type = "tff",
  report_id = NULL,
  dataset_id = NULL,
  market_codes = NULL,
  from = NULL,
  to = NULL,
  page_size = 5000L,
  max_pages = Inf
)

Arguments

report_variant

Report variant: "futures_only" or "combined".

report_type

Report family: "tff", "disaggregated", or "legacy".

report_id

Stable local report identifier.

dataset_id

Optional official Socrata dataset identifier.

market_codes

Optional CFTC contract-market codes.

from, to

Optional inclusive report-date bounds.

page_size

Number of source rows requested per page.

max_pages

Optional page limit, primarily useful for diagnostics.

Value

A standardized wide data.table, one row per market and report date.


investdatar documentation built on Aug. 21, 2026, 5:17 p.m.