cot
Get Commitment of Traders Reports.
Examples
from openbb import obb
# Get the latest report for all items classified as, GOLD.
obb.regulators.cftc.cot(id='gold', provider='cftc')
# Enter the entire history for a single CFTC Market Contract Code.
obb.regulators.cftc.cot(id='088691', provider='cftc')
# Get the report for futures only.
obb.regulators.cftc.cot(id='088691', futures_only=True, provider='cftc')
# Get the most recent Commodity Index Traders Supplemental Report.
obb.regulators.cftc.cot(id='all', report_type=supplemental, provider='cftc')
Parameters
- standard
- cftc
Name | Type | Description | Default | Optional |
---|---|---|---|---|
id | str | A string with the CFTC market code or other identifying string, such as the contract market name, commodity name, or commodity group - i.e, 'gold' or 'japanese yen'.Default report is Fed Funds Futures. Use the 'cftc_market_code' for an exact match. | 045601 | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. Default is the most recent report. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
id | str | A string with the CFTC market code or other identifying string, such as the contract market name, commodity name, or commodity group - i.e, 'gold' or 'japanese yen'.Default report is Fed Funds Futures. Use the 'cftc_market_code' for an exact match. | 045601 | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. Default is the most recent report. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
report_type | Literal['legacy', 'disaggregated', 'financial', 'supplemental'] | The type of report to retrieve. Set id as 'all' to return all items in the report; type (default date range returns the latest report). The Legacy report is broken down by exchange; with reported open interest further broken down into three trader classifications: commercial,; non-commercial and non-reportable. The Disaggregated reports are broken down by Agriculture and; Natural Resource contracts. The Disaggregated reports break down reportable open interest positions; into four classifications: Producer/Merchant, Swap Dealers, Managed Money and Other Reportables. The Traders in Financial Futures (TFF) report includes financial contracts. The TFF report breaks; down the reported open interest into five classifications: Dealer, Asset Manager, Leveraged Money,; Other Reportables and Non-Reportables. | legacy | True |
futures_only | bool | Returns the futures-only report. Default is False, for the combined report. | False | True |
Returns
OBBject
results : List[COT]
Serializable results.
provider : Optional[Literal['cftc']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
Data
- standard
- cftc
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
report_week | str | Report week for the year. |
market_and_exchange_names | str | Market and exchange names. |
cftc_contract_market_code | str | CFTC contract market code. |
cftc_market_code | str | CFTC market code. |
cftc_region_code | str | CFTC region code. |
cftc_commodity_code | str | CFTC commodity code. |
cftc_contract_market_code_quotes | str | CFTC contract market code quotes. |
cftc_market_code_quotes | str | CFTC market code quotes. |
cftc_commodity_code_quotes | str | CFTC commodity code quotes. |
cftc_subgroup_code | str | CFTC subgroup code. |
commodity | str | Commodity. |
commodity_group | str | Commodity group name. |
commodity_subgroup | str | Commodity subgroup name. |
futonly_or_combined | str | If the report is futures-only or combined. |
contract_units | str | Contract units. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
report_week | str | Report week for the year. |
market_and_exchange_names | str | Market and exchange names. |
cftc_contract_market_code | str | CFTC contract market code. |
cftc_market_code | str | CFTC market code. |
cftc_region_code | str | CFTC region code. |
cftc_commodity_code | str | CFTC commodity code. |
cftc_contract_market_code_quotes | str | CFTC contract market code quotes. |
cftc_market_code_quotes | str | CFTC market code quotes. |
cftc_commodity_code_quotes | str | CFTC commodity code quotes. |
cftc_subgroup_code | str | CFTC subgroup code. |
commodity | str | Commodity. |
commodity_group | str | Commodity group name. |
commodity_subgroup | str | Commodity subgroup name. |
futonly_or_combined | str | If the report is futures-only or combined. |
contract_units | str | Contract units. |