{
  "openapi": "3.0.1",
  "info": {
    "title": "COT Report API - Hedge Fund Futures Positioning (CFTC)",
    "description": "Weekly CFTC Commitments of Traders data: how hedge funds, asset managers and commercial hedgers are positioned in gold, oil, S&P 500, Treasuries, FX and Bitcoin futures. Net positions, weekly changes, COT index and extreme-positioning flags.",
    "version": "0.1",
    "x-build-id": "SOuBMLMnwgWTJ3b2u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smartmoney-data~cftc-cot-positioning-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smartmoney-data-cftc-cot-positioning-tracker",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/smartmoney-data~cftc-cot-positioning-tracker/runs": {
      "post": {
        "operationId": "runs-sync-smartmoney-data-cftc-cot-positioning-tracker",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/smartmoney-data~cftc-cot-positioning-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-smartmoney-data-cftc-cot-positioning-tracker",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "markets": {
            "title": "Futures markets",
            "type": "array",
            "description": "Markets to report on: a shortcut (GOLD, SILVER, COPPER, CRUDE OIL, NATURAL GAS, CORN, SOYBEANS, WHEAT, S&P 500, NASDAQ 100, VIX, 10Y, EURO, YEN, BRITISH POUND, US DOLLAR INDEX, BITCOIN), a 6-character CFTC contract code (e.g. 088691), or any word from the CFTC market name (e.g. COFFEE, ETHER). Leave empty for this week's biggest hedge fund moves across all markets.",
            "items": {
              "type": "string"
            }
          },
          "reportType": {
            "title": "COT report",
            "enum": [
              "auto",
              "financial",
              "disaggregated",
              "legacy"
            ],
            "type": "string",
            "description": "Which COT breakdown to use. Auto uses Traders in Financial Futures for stock indexes, rates, currencies and crypto (smart money = leveraged funds) and Disaggregated for commodities (smart money = managed money). Legacy covers every market with large speculators vs commercials.",
            "default": "auto"
          },
          "futuresAndOptions": {
            "title": "Include options",
            "type": "boolean",
            "description": "Use the futures-and-options-combined reports instead of futures only.",
            "default": false
          },
          "historyWeeks": {
            "title": "History for the COT index (weeks)",
            "minimum": 8,
            "maximum": 780,
            "type": "integer",
            "description": "The COT index shows where the current net position sits between its lowest (0) and highest (100) over this many weeks. 156 = 3 years, the usual setting.",
            "default": 156
          },
          "maxMarketsPerKeyword": {
            "title": "Markets per name keyword",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "A name keyword can match several contracts (GOLD also matches MICRO GOLD). Keep this many, largest open interest first.",
            "default": 2
          },
          "maxResults": {
            "title": "Markets (market-wide mode)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "When no markets are given: how many markets with this week's biggest smart money moves to return.",
            "default": 20
          },
          "minOpenInterest": {
            "title": "Minimum open interest (market-wide mode)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip thinly traded contracts in market-wide mode.",
            "default": 5000
          },
          "extremeThreshold": {
            "title": "Extreme positioning threshold",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "Flag EXTREME_LONG when the smart money COT index is at or above this, EXTREME_SHORT at or below 100 minus this.",
            "default": 90
          },
          "sharpChangePctOi": {
            "title": "Sharp move threshold (% of open interest)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Flag SHARP_BUYING / SHARP_SELLING when the smart money net position changed by at least this % of open interest in one week.",
            "default": 5
          },
          "signalsOnly": {
            "title": "Only flagged markets",
            "type": "boolean",
            "description": "Return only markets with a flag (extreme, flipped or sharp move). You pay only for rows returned.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}