Commodity Futures Trading Commission TFF API

Traders in Financial Futures format

OpenAPI Specification

commodity-futures-trading-commission-tff-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: CFTC Commitments of Traders () SODA COT TFF API
  description: OpenAPI description of the public Socrata Open Data API (SODA) endpoints that the U.S. Commodity Futures Trading Commission exposes through its Public Reporting Environment at publicreporting.cftc.gov. These datasets publish weekly Commitments of Traders (COT) positions for futures and futures plus options, in Legacy, Disaggregated, and Traders in Financial Futures (TFF) report formats.
  version: 1.0.0
  contact:
    name: CFTC Public Reporting
    url: https://publicreporting.cftc.gov/
servers:
- url: https://publicreporting.cftc.gov/resource
  description: CFTC Public Reporting Environment SODA endpoint
tags:
- name: TFF
  description: Traders in Financial Futures format
paths:
  /gpe5-46if.json:
    get:
      operationId: getTffFuturesOnly
      summary: Traders in Financial Futures (Futures Only)
      description: Weekly TFF COT report covering futures-only positions for financial futures.
      tags:
      - TFF
      parameters:
      - $ref: '#/components/parameters/SocrataLimit'
      - $ref: '#/components/parameters/SocrataOffset'
      - $ref: '#/components/parameters/SocrataSelect'
      - $ref: '#/components/parameters/SocrataWhere'
      - $ref: '#/components/parameters/SocrataOrder'
      responses:
        '200':
          description: An array of TFF futures-only COT records
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CotTffRow'
  /yw9f-hn96.json:
    get:
      operationId: getTffCombined
      summary: Traders in Financial Futures (Combined)
      description: Weekly TFF COT report covering combined futures and options positions for financial futures.
      tags:
      - TFF
      parameters:
      - $ref: '#/components/parameters/SocrataLimit'
      - $ref: '#/components/parameters/SocrataOffset'
      - $ref: '#/components/parameters/SocrataSelect'
      - $ref: '#/components/parameters/SocrataWhere'
      - $ref: '#/components/parameters/SocrataOrder'
      responses:
        '200':
          description: An array of TFF combined COT records
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CotTffRow'
components:
  parameters:
    SocrataOffset:
      name: $offset
      in: query
      description: Number of rows to skip for paging
      schema:
        type: integer
        minimum: 0
    SocrataSelect:
      name: $select
      in: query
      description: SoQL select clause specifying which columns to return
      schema:
        type: string
    SocrataWhere:
      name: $where
      in: query
      description: SoQL where clause for filtering rows
      schema:
        type: string
    SocrataLimit:
      name: $limit
      in: query
      description: Maximum number of rows to return (Socrata default 1000, max 50000)
      schema:
        type: integer
        minimum: 1
        maximum: 50000
        default: 1000
    SocrataOrder:
      name: $order
      in: query
      description: SoQL order by clause
      schema:
        type: string
  schemas:
    CotTffRow:
      type: object
      properties:
        market_and_exchange_names:
          type: string
        report_date_as_yyyy_mm_dd:
          type: string
          format: date
        cftc_contract_market_code:
          type: string
        cftc_commodity_code:
          type: string
        open_interest_all:
          type: string
        dealer_positions_long_all:
          type: string
        dealer_positions_short_all:
          type: string
        asset_mgr_positions_long:
          type: string
        asset_mgr_positions_short:
          type: string
        lev_money_positions_long:
          type: string
        lev_money_positions_short:
          type: string
        other_rept_positions_long:
          type: string
        other_rept_positions_short:
          type: string