{
  "openapi": "3.0.1",
  "info": {
    "title": "Options Flow API - Unusual Whales Flow Alerts, Dark Pool, GEX",
    "description": "Pull unusual options flow alerts, unusual options activity, the option trades tape, hottest chains, option chains with greeks, gamma exposure (GEX), IV rank, max pain, dark pool prints, market tide, congress and insider trades from the Unusual Whales API into a dataset. Bring your own API key.",
    "version": "0.1",
    "x-build-id": "R0EIlEYl8K2xVPbf1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~options-flow-dark-pool-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-options-flow-dark-pool-api",
        "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/nabeelbaghoor~options-flow-dark-pool-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-options-flow-dark-pool-api",
        "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/nabeelbaghoor~options-flow-dark-pool-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-options-flow-dark-pool-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "flowAlerts",
              "unusualActivity",
              "hottestChains",
              "optionTrades",
              "optionChain",
              "contractTrades",
              "contractHistory",
              "greekExposure",
              "gexByStrike",
              "ivRank",
              "maxPain",
              "optionsVolume",
              "darkpoolRecent",
              "darkpoolTicker",
              "marketTide",
              "congressTrades",
              "insiderTransactions"
            ],
            "type": "string",
            "description": "Flow alerts are the provider's unusual options flow alerts (repeated hits, sweeps, floor trades). Unusual options activity lists the contracts flagged unusual on a day. Hottest chains screens every option contract. The option trades tape lists individual prints of the latest trading day. Option chain lists every contract of a ticker with quotes and greeks. The contract modes read trades or daily history of one option. Greek exposure, spot GEX by strike, IV rank, max pain and options volume read one ticker each. Dark pool, market tide, congress trades and insider transactions read those datasets.",
            "default": "flowAlerts"
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock, ETF or index symbols such as AAPL, SPY, BRK.B or SPX, one per line. Per-ticker modes (option chain, greek exposure, spot GEX, IV rank, max pain, options volume, dark pool by ticker) read each ticker separately; flow alerts, unusual activity, hottest chains, the trades tape and insider transactions filter by all of them in one request; congress trades read one ticker at a time or the whole Congress when empty.",
            "items": {
              "type": "string"
            }
          },
          "excludeTickers": {
            "title": "Exclude tickers",
            "type": "array",
            "description": "Flow alerts, unusual activity, hottest chains, the trades tape and insider transactions. Tickers to leave out, one per line. Use either this or Tickers, not both.",
            "items": {
              "type": "string"
            }
          },
          "contracts": {
            "title": "Option contracts",
            "type": "array",
            "description": "Option contract trades and history. OSI option symbols, one per line: ticker, expiry as YYMMDD, C or P, then the strike times 1000 in 8 digits, for example TSLA250117C00250000.",
            "items": {
              "type": "string"
            }
          },
          "date": {
            "title": "Trading date",
            "type": "string",
            "description": "A trading date such as 2026-01-30 for unusual activity, hottest chains, contract trades, greek exposure, spot GEX, IV rank, max pain, dark pool, market tide and congress trades. Defaults to the last trading date. Your plan sets how far back you can go."
          },
          "from": {
            "title": "From",
            "type": "string",
            "description": "Flow alerts, the trades tape and dark pool by ticker: the earliest time to read, as a date (2026-01-30), a date and time (2026-01-30T14:30:00Z) or a unix time. Insider transactions: the earliest transaction date (date only)."
          },
          "to": {
            "title": "To",
            "type": "string",
            "description": "Same modes as From: the latest time or date to read. Rows are read newest first from here backwards."
          },
          "unusualPreset": {
            "title": "Unusual flow preset",
            "type": "boolean",
            "description": "Flow alerts and hottest chains. Applies the provider's live options flow \"unusual\" criteria (volume over open interest, out of the money, 60 days or less to expiry, mostly ask side, premium of 10,000 USD or more). Any filter you set below overrides the matching part of the preset."
          },
          "optionType": {
            "title": "Calls or puts",
            "enum": [
              "all",
              "call",
              "put"
            ],
            "type": "string",
            "description": "Flow alerts, hottest chains, the trades tape and the option chain.",
            "default": "all"
          },
          "side": {
            "title": "Trade side",
            "enum": [
              "all",
              "ask",
              "bid",
              "mid"
            ],
            "type": "string",
            "description": "Flow alerts (ask or bid), the trades tape and option contract trades.",
            "default": "all"
          },
          "alertRules": {
            "title": "Flow alert rules",
            "type": "array",
            "description": "Flow alerts. Only these alert rules. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "RepeatedHits",
                "RepeatedHitsAscendingFill",
                "RepeatedHitsDescendingFill",
                "FloorTradeSmallCap",
                "FloorTradeMidCap",
                "FloorTradeLargeCap",
                "OtmEarningsFloor",
                "LowHistoricVolumeFloor",
                "SweepsFollowedByFloor"
              ],
              "enumTitles": [
                "Repeated hits",
                "Repeated hits, ascending fill",
                "Repeated hits, descending fill",
                "Floor trade, small cap",
                "Floor trade, mid cap",
                "Floor trade, large cap",
                "OTM earnings floor",
                "Low historic volume floor",
                "Sweeps followed by floor"
              ]
            }
          },
          "minPremium": {
            "title": "Minimum premium (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Flow alerts, unusual activity, hottest chains, the trades tape, contract trades and dark pool prints. The smallest total premium, for example 100000 for six figure orders."
          },
          "maxPremium": {
            "title": "Maximum premium (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Flow alerts, hottest chains, the trades tape and dark pool prints."
          },
          "minSize": {
            "title": "Minimum size",
            "minimum": 0,
            "type": "integer",
            "description": "Flow alerts, the trades tape (contracts) and dark pool prints (shares)."
          },
          "minDte": {
            "title": "Minimum days to expiry",
            "minimum": 0,
            "type": "integer",
            "description": "Flow alerts, hottest chains, the trades tape and the option chain."
          },
          "maxDte": {
            "title": "Maximum days to expiry",
            "minimum": 0,
            "type": "integer",
            "description": "Flow alerts, unusual activity, hottest chains, the trades tape and the option chain. 0 means expiring today (0DTE)."
          },
          "minVolumeOiRatio": {
            "title": "Minimum volume to open interest ratio",
            "minimum": 0,
            "type": "number",
            "description": "Flow alerts, hottest chains and the trades tape. 1 means volume at least equal to open interest."
          },
          "otmOnly": {
            "title": "Out of the money only",
            "type": "boolean",
            "description": "Flow alerts, hottest chains, the trades tape, the option chain and market tide."
          },
          "volumeGreaterOi": {
            "title": "Volume above open interest only",
            "type": "boolean",
            "description": "Flow alerts, hottest chains, the trades tape and the option chain."
          },
          "sizeGreaterOi": {
            "title": "Size above open interest only",
            "type": "boolean",
            "description": "Flow alerts and the trades tape. A strong hint of new positions."
          },
          "openingOnly": {
            "title": "Opening trades only",
            "type": "boolean",
            "description": "Flow alerts (all trades opening) and the trades tape. The provider notes repeated hits alerts are rarely all opening, so this mostly keeps floor and sweep alerts."
          },
          "multiLeg": {
            "title": "Multi-leg trades",
            "enum": [
              "any",
              "only",
              "exclude"
            ],
            "type": "string",
            "description": "Flow alerts and the trades tape. Spreads and other multi-leg orders.",
            "default": "any"
          },
          "issueTypes": {
            "title": "Issue types",
            "type": "array",
            "description": "Flow alerts, unusual activity, hottest chains and the trades tape.",
            "items": {
              "type": "string",
              "enum": [
                "Common Stock",
                "ETF",
                "Index",
                "ADR"
              ],
              "enumTitles": [
                "Common stock",
                "ETF",
                "Index",
                "ADR"
              ]
            }
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "Unusual activity, hottest chains, the trades tape and insider transactions.",
            "items": {
              "type": "string",
              "enum": [
                "Basic Materials",
                "Communication Services",
                "Consumer Cyclical",
                "Consumer Defensive",
                "Energy",
                "Financial Services",
                "Healthcare",
                "Industrials",
                "Real Estate",
                "Technology",
                "Utilities"
              ],
              "enumTitles": [
                "Basic Materials",
                "Communication Services",
                "Consumer Cyclical",
                "Consumer Defensive",
                "Energy",
                "Financial Services",
                "Healthcare",
                "Industrials",
                "Real Estate",
                "Technology",
                "Utilities"
              ]
            }
          },
          "minMarketcap": {
            "title": "Minimum market cap (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Flow alerts, hottest chains, the trades tape and insider transactions."
          },
          "maxMarketcap": {
            "title": "Maximum market cap (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Same modes as the minimum."
          },
          "expiry": {
            "title": "Expiry date",
            "type": "string",
            "description": "Hottest chains, the trades tape and the option chain. One expiry such as 2026-01-16."
          },
          "minStrike": {
            "title": "Minimum strike",
            "minimum": 0,
            "type": "number",
            "description": "Hottest chains, the trades tape and spot GEX by strike."
          },
          "maxStrike": {
            "title": "Maximum strike",
            "minimum": 0,
            "type": "number",
            "description": "Same modes as the minimum."
          },
          "screenerSort": {
            "title": "Hottest chains sort",
            "enum": [
              "premium",
              "volume",
              "open_interest",
              "volume_oi_ratio",
              "iv",
              "trades",
              "floor_volume",
              "floor_volume_ratio",
              "multileg_volume",
              "bid_ask_vol",
              "bull_bear_vol",
              "daily_perc_change",
              "diff",
              "dte",
              "expiry",
              "earnings",
              "spread",
              "stock_price",
              "from_high",
              "from_low",
              "tape_time",
              "ticker",
              "volume_ticker_vol_ratio"
            ],
            "type": "string",
            "description": "Hottest chains. The field the screen is ordered by.",
            "default": "premium"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Hottest chains.",
            "default": "desc"
          },
          "lookback": {
            "title": "Lookback",
            "type": "string",
            "description": "Greek exposure: YTD or a span such as 5D, 2W, 6M or 1Y. IV rank: 1w, 1m, 3m, 6m or 1y.",
            "default": "1y"
          },
          "interval5m": {
            "title": "Five minute intervals",
            "type": "boolean",
            "description": "Market tide. Untick for one minute intervals.",
            "default": true
          },
          "darkpoolSort": {
            "title": "Dark pool sort",
            "enum": [
              "executed_at",
              "premium",
              "size",
              "volume"
            ],
            "type": "string",
            "description": "Dark pool prints across the market.",
            "default": "executed_at"
          },
          "cancellation": {
            "title": "Cancelled prints",
            "enum": [
              "all",
              "hide_cancelled",
              "cancelled_only"
            ],
            "type": "string",
            "description": "Dark pool prints.",
            "default": "all"
          },
          "ownerName": {
            "title": "Insider name",
            "type": "string",
            "description": "Insider transactions. The name of the insider as filed, for example Huang Jen Hsun."
          },
          "insiderRole": {
            "title": "Insider role",
            "enum": [
              "any",
              "director",
              "officer",
              "tenPercentOwner"
            ],
            "type": "string",
            "description": "Insider transactions.",
            "default": "any"
          },
          "transactionCodes": {
            "title": "Transaction codes",
            "type": "array",
            "description": "Insider transactions. SEC Form 4 codes, one per line: P purchase, S sale, M option exercise, A award, G gift, F tax withholding.",
            "items": {
              "type": "string"
            }
          },
          "formTypes": {
            "title": "SEC form types",
            "type": "array",
            "description": "Insider transactions. Form 144 is a notice of intended sale; pick 4 and 4/A for executed trades only.",
            "items": {
              "type": "string",
              "enum": [
                "3",
                "3/A",
                "4",
                "4/A",
                "5",
                "5/A",
                "144",
                "144/A"
              ],
              "enumTitles": [
                "Form 3",
                "Form 3/A",
                "Form 4",
                "Form 4/A",
                "Form 5",
                "Form 5/A",
                "Form 144",
                "Form 144/A"
              ]
            }
          },
          "minValue": {
            "title": "Minimum transaction value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Insider transactions."
          },
          "sp500Only": {
            "title": "S&P 500 companies only",
            "type": "boolean",
            "description": "Insider transactions."
          },
          "groupTransactions": {
            "title": "Group same day transactions",
            "type": "boolean",
            "description": "Insider transactions. The provider groups one person's transactions with the same code on the same day into one row; untick to read every transaction.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for, across all tickers and contracts. Pages are read up to the provider's page size (200 flow alerts, 500 trades) until this ceiling.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Pacing. Your plan sets a per-minute cap, and the actor waits for the reset and retries when the provider answers 429.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Unusual Whales API token (a UUID from your API dashboard). Stored as a secret and sent only in the Authorization header; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}