{
  "openapi": "3.0.1",
  "info": {
    "title": "Stocktwits Watchlist Sentiment Monitor",
    "description": "Monitor Stocktwits watchlists for bullish and bearish sentiment shifts, reversals, and message-volume spikes. Get compact, alert-ready signals for stocks and crypto.",
    "version": "0.1",
    "x-build-id": "nXFkweHfRSLheZy3s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~stocktwits-watchlist-sentiment-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-stocktwits-watchlist-sentiment-monitor",
        "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/fetchfinch~stocktwits-watchlist-sentiment-monitor/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-stocktwits-watchlist-sentiment-monitor",
        "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/fetchfinch~stocktwits-watchlist-sentiment-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-stocktwits-watchlist-sentiment-monitor",
        "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",
        "required": [
          "symbols"
        ],
        "properties": {
          "symbols": {
            "title": "Symbols",
            "minItems": 1,
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Stocktwits symbols without the $ prefix. Crypto symbols commonly use Stocktwits' .X suffix, for example BTC.X.",
            "default": [
              "AAPL",
              "TSLA",
              "NVDA"
            ],
            "items": {
              "type": "string"
            }
          },
          "monitorId": {
            "title": "Monitor ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$",
            "minLength": 1,
            "maxLength": 48,
            "type": "string",
            "description": "Stable ID used for persistent state. Use a different ID for each independent watchlist or schedule.",
            "default": "default-watchlist"
          },
          "windowMinutes": {
            "title": "Rolling window (minutes)",
            "minimum": 5,
            "maximum": 10080,
            "type": "integer",
            "description": "Only messages inside this rolling time window contribute to sentiment and volume metrics.",
            "default": 60
          },
          "maxMessagesPerSymbol": {
            "title": "Maximum messages per symbol",
            "minimum": 30,
            "maximum": 2000,
            "type": "integer",
            "description": "Collection and rolling-state cap per symbol. Increase this for high-volume symbols or long windows.",
            "default": 200
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "signalsOnly",
              "allSnapshots"
            ],
            "type": "string",
            "description": "signalsOnly keeps scheduled-run datasets alert-ready. allSnapshots also emits unchanged symbol snapshots.",
            "default": "signalsOnly"
          },
          "emitBaseline": {
            "title": "Emit first-run baseline",
            "type": "boolean",
            "description": "Write one BASELINE item per symbol the first time this monitor runs.",
            "default": true
          },
          "thresholds": {
            "title": "Signal thresholds",
            "type": "object",
            "description": "Thresholds are evaluated against the previous successful snapshot for the same monitor ID.",
            "properties": {
              "sentimentShiftPoints": {
                "title": "Sentiment shift (points)",
                "description": "Minimum absolute score change required for a SENTIMENT_SHIFT event.",
                "type": "number",
                "editor": "number",
                "minimum": 1,
                "maximum": 200
              },
              "reversalMinScore": {
                "title": "Minimum reversal score",
                "description": "Both old and new scores must have at least this magnitude for a reversal.",
                "type": "number",
                "editor": "number",
                "minimum": 0,
                "maximum": 100
              },
              "mentionSpikeMultiplier": {
                "title": "Message-volume spike multiplier",
                "description": "Current rolling message count divided by the previous count.",
                "type": "number",
                "editor": "number",
                "minimum": 1.1,
                "maximum": 100
              },
              "minMessagesForSpike": {
                "title": "Minimum messages for spike",
                "description": "Ignore volume multipliers until the current window contains this many messages.",
                "type": "integer",
                "editor": "number",
                "minimum": 1,
                "maximum": 2000
              },
              "minTaggedMessages": {
                "title": "Minimum tagged messages",
                "description": "Both snapshots need this many bullish/bearish labels before sentiment alerts are evaluated.",
                "type": "integer",
                "editor": "number",
                "minimum": 1,
                "maximum": 2000
              }
            },
            "default": {
              "sentimentShiftPoints": 20,
              "reversalMinScore": 15,
              "mentionSpikeMultiplier": 2,
              "minMessagesForSpike": 10,
              "minTaggedMessages": 5
            }
          },
          "topMessages": {
            "title": "Top messages per signal",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of high-engagement messages included as evidence in each output item.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Maximum symbol concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keep this conservative to reduce rate-limit risk.",
            "default": 3
          },
          "maxRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retry rate limits, Cloudflare blocks, and transient server failures with exponential backoff.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct HTTP is attempted by default. If Stocktwits returns Cloudflare 403 responses, enable Apify Proxy; residential IPs are the most reliable fallback.",
            "default": {
              "useApifyProxy": false
            }
          },
          "resetState": {
            "title": "Reset monitor state",
            "type": "boolean",
            "description": "Discard this monitor's previous snapshots and create a fresh baseline.",
            "default": false
          },
          "failOnSymbolError": {
            "title": "Fail on any symbol error",
            "type": "boolean",
            "description": "When disabled, failed symbols emit ERROR records while successful symbols continue.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}