{
  "openapi": "3.0.1",
  "info": {
    "title": "BIGA · A股筛选与多因子研究 | China A-Share Stock Screener",
    "description": "China A-share stock screener for multifactor research, ML stock analysis, stock scoring and backtesting. Visual workspace and API. A股股票筛选器：多因子量化研究、机器学习股票分析、单股评分、筹码分布及股票回测。Research only; not investment advice. 仅供研究，不构成投资建议。",
    "version": "1.0",
    "x-build-id": "gSNazC7f4xq9uNXyi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wei964991~biga-a-share-quantitative-research/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wei964991-biga-a-share-quantitative-research",
        "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/wei964991~biga-a-share-quantitative-research/runs": {
      "post": {
        "operationId": "runs-sync-wei964991-biga-a-share-quantitative-research",
        "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/wei964991~biga-a-share-quantitative-research/run-sync": {
      "post": {
        "operationId": "run-sync-wei964991-biga-a-share-quantitative-research",
        "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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "运行模式",
            "enum": [
              "web",
              "score",
              "screen",
              "chip",
              "preflight",
              "research",
              "backtest",
              "review",
              "warmup"
            ],
            "type": "string",
            "description": "web 启动交互式研究工作台；其他模式完成单次分析后退出。网页仅在本次运行期间可用。 screen 全市场成功分析 $0.49／次；score 或指定股票池按成功分析标的 $0.05／只／次；平台用量另计。",
            "default": "web"
          },
          "symbols": {
            "title": "研究标的代码",
            "maxItems": 500,
            "type": "array",
            "description": "六位 A 股代码。score 至少填写一项；screen、chip、warmup 传入空数组时处理全市场。默认代码仅为格式示例，不构成推荐。",
            "items": {
              "type": "string"
            },
            "default": [
              "600036"
            ]
          },
          "strategy": {
            "title": "分析引擎",
            "enum": [
              "rule",
              "ml",
              "both"
            ],
            "type": "string",
            "description": "选择六因子规则引擎、机器学习模型或两者分别评估。规则评分与模型事件概率估计的含义不同。",
            "default": "both"
          },
          "topN": {
            "title": "结果数量上限",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "规则结果最多保留该数量；ML 结果最多保留该数量的非涨停标的，并可能附加涨停标的。结果排序不构成投资建议。",
            "default": 10
          },
          "maxCandidates": {
            "title": "规则初筛候选数量",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "规则引擎在行情快照初筛后保留的候选数量。ML 引擎独立评估所选股票池；扩大范围会增加耗时与数据请求。",
            "default": 200
          },
          "includeCommentary": {
            "title": "生成市场概览",
            "type": "boolean",
            "description": "汇总全市场情绪和行业热点，会增加数据源请求量。",
            "default": true
          },
          "tradingDayOnly": {
            "title": "仅交易日运行",
            "type": "boolean",
            "description": "screen/score/chip 在非 XSHG 交易日跳过。时区为 Asia/Shanghai。",
            "default": false
          },
          "tailSessionOnly": {
            "title": "仅尾盘运行",
            "type": "boolean",
            "description": "screen/score 仅在交易日 14:30–15:00 运行，否则跳过。",
            "default": false
          },
          "allowStaleData": {
            "title": "允许历史行情评分",
            "type": "boolean",
            "description": "默认拒绝早于最近交易日的快照/日 K/分钟数据；打开时输出实际数据日期。",
            "default": false
          },
          "tushareToken": {
            "title": "Tushare 数据访问密钥",
            "type": "string",
            "description": "历史数据采集需要使用你自己的 Tushare Token，并具备相应数据权限。按 Apify 密钥字段加密保存，不在页面展示；不提供共享行情密钥。"
          },
          "proxyConfiguration": {
            "title": "代理设置",
            "type": "object",
            "description": "可选 Apify 或自定义代理；默认直接连接。",
            "default": {
              "useApifyProxy": false
            }
          },
          "stateStoreName": {
            "title": "研究数据空间（可选）",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{2,62}$",
            "type": "string",
            "description": "选择你账户中的 Key-value store，或填写其名称/ID，复用缓存、模型及研究记录。留空使用本次运行独立存储；同一数据空间应串行运行。"
          },
          "persistState": {
            "title": "保存研究状态",
            "type": "boolean",
            "description": "保存缓存、模型、研究数据和复盘记录；跨运行复用需选择同一数据空间。无论本项是否开启，当前运行仍保存迁移恢复检查点，且不会与其他用户共享。",
            "default": true
          },
          "stateSnapshotKey": {
            "title": "研究状态快照",
            "pattern": "^[a-zA-Z0-9_-]{1,200}$",
            "type": "string",
            "description": "LATEST 恢复所选数据空间的最新状态；也可填写此前输出的 snapshotKey 恢复指定版本。",
            "default": "LATEST"
          },
          "chipPercent": {
            "title": "筹码覆盖比例",
            "minimum": 50,
            "maximum": 95,
            "type": "number",
            "description": "例如 70 表示中间 70% 的筹码成本范围。",
            "default": 70
          },
          "chipThreshold": {
            "title": "集中度阈值 %",
            "minimum": 0.01,
            "maximum": 100,
            "type": "number",
            "description": "筛选集中度低于此值的股票。",
            "default": 4
          },
          "researchStage": {
            "title": "研究阶段",
            "enum": [
              "full",
              "collect",
              "analyze",
              "train"
            ],
            "type": "string",
            "description": "full=采集、特征、因子分析、训练；其他阶段复用状态内已有数据。",
            "default": "full"
          },
          "months": {
            "title": "历史回溯月数",
            "minimum": 3,
            "maximum": 36,
            "type": "integer",
            "description": "历史行情采集范围。",
            "default": 18
          },
          "surgeThreshold": {
            "title": "次日涨幅事件阈值（%）",
            "minimum": 3,
            "maximum": 20,
            "type": "number",
            "description": "训练目标为次日涨跌幅达到此阈值。该事件不等于开盘卖出收益；模型输出未经概率校准。",
            "default": 7
          },
          "modelType": {
            "title": "训练模型",
            "enum": [
              "xgboost",
              "lightgbm"
            ],
            "type": "string",
            "description": "选择新训练使用的模型。评分默认使用状态内最新模型或随包模型。",
            "default": "xgboost"
          },
          "startDate": {
            "title": "回测开始日期",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "backtest 必填，YYYY-MM-DD。"
          },
          "endDate": {
            "title": "回测结束日期",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "backtest 必填，YYYY-MM-DD。"
          },
          "probabilityThreshold": {
            "title": "ML 回测筛选阈值",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "对未校准模型输出应用的历史回测阈值，与线上 topN 排序口径不同，不代表胜率。",
            "default": 0.75
          },
          "recommendationKey": {
            "title": "待复盘的信号记录",
            "pattern": "^recommend-[a-zA-Z0-9_-]+$",
            "type": "string",
            "description": "填写此前运行返回的 recommendationKey，且使用同一研究数据空间。字段名称为兼容已有 API 保留。"
          },
          "reviewDate": {
            "title": "复盘日期",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD；留空使用实时行情。"
          },
          "configOverrides": {
            "title": "高级策略参数",
            "type": "object",
            "description": "仅允许覆盖 filter/strategy/market 的已有数值和布尔参数；不接受密钥或文件路径。",
            "default": {}
          },
          "webSessionHours": {
            "title": "工作台会话时长（小时）",
            "minimum": 0.25,
            "maximum": 24,
            "type": "number",
            "description": "工作台仅在 Actor 运行期间在线；默认 1 小时。运行超时应大于会话时长并预留初始化时间；结束后重新运行获取新链接。",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}