{
    "openapi": "3.0.3",
    "info": {
        "title": "熔岩 · 消息面热度监测 API",
        "version": "1.0.0",
        "description": "股票与概念板块的消息面热度监测数据订阅。只读接口；输出结构化文字与匿名机构/大V ID，不含多空观点与原文。拿 Key：登录熔岩 → 左侧「AI数据服务」→「API Key」→「创建」。计费：先送 100 元代金券，之后每次 0.005 元（约 1000 次 5 元），非 2xx 不计费。文档：https://lava.ai-dolphin.com/subscribe/docs",
        "contact": {
            "name": "熔岩 Lava",
            "url": "https://lava.ai-dolphin.com/subscribe/v1/docs"
        }
    },
    "servers": [
        {
            "url": "https://lava.ai-dolphin.com/subscribe/v1"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        },
        {
            "apiKeyHeader": []
        }
    ],
    "tags": [
        {
            "name": "opinions",
            "description": "消息面要点（按股票 / 关键词查）"
        },
        {
            "name": "agencies",
            "description": "匿名机构/大V评分（排行 / 历史分数）"
        },
        {
            "name": "concepts",
            "description": "概念板块热度（概念里哪些股热 / 股票关联哪些概念）"
        }
    ],
    "paths": {
        "/opinions": {
            "get": {
                "operationId": "listOpinionsByStock",
                "summary": "个股消息面热度：某只股票最近被提到的记录",
                "description": "按股票查最近一段时间的消息面记录：一句话摘要、要点、涉及的股票/概念、匿名机构/大V ID 和机构/大V分；同时给出被提到几次、有多少机构/大V提到等热度数字。不含多空观点、不含原文。",
                "tags": [
                    "opinions"
                ],
                "parameters": [
                    {
                        "name": "stock_name",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "宁德时代"
                        },
                        "description": "股票简称（与 ts_code 二选一）"
                    },
                    {
                        "name": "ts_code",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "300750.SZ"
                        },
                        "description": "股票代码，如 300750.SZ（与 stock_name 二选一）"
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10,
                            "minimum": 1,
                            "maximum": 90
                        },
                        "description": "回看天数（未给 start_date 时生效）"
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-10-28"
                        },
                        "description": "开始日期 YYYY-MM-DD"
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-10-28"
                        },
                        "description": "结束日期 YYYY-MM-DD，默认今天；区间最长 92 天"
                    },
                    {
                        "name": "only_this_stock",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                0,
                                1
                            ],
                            "default": 0
                        },
                        "description": "1=只要仅涉及该股的记录；0=该股为第一提及股的记录"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 1,
                            "maximum": 200
                        },
                        "description": "返回条数，默认 50，最大 200"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "opinions",
                "x-billing": "per-call"
            }
        },
        "/opinions/search": {
            "get": {
                "operationId": "searchOpinions",
                "summary": "按关键词搜消息面记录",
                "description": "在要点里搜关键词（最多 5 个词，用空格隔开，要全部包含），最新的排在前面。",
                "tags": [
                    "opinions"
                ],
                "parameters": [
                    {
                        "name": "keyword",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "固态电池"
                        },
                        "description": "关键词，≤50 字符"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-10-28"
                        },
                        "description": "起始日期，默认 30 天前，最早 180 天前"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 1,
                            "maximum": 200
                        },
                        "description": "返回条数，默认 50，最大 200"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "opinions",
                "x-billing": "per-call"
            }
        },
        "/agencies/ranking": {
            "get": {
                "operationId": "listAgencyRanking",
                "summary": "匿名机构/大V评分排行（当前）",
                "description": "机构/大V用不变的匿名编号 agency_id 表示；返回机构/大V分（约 450~1500，1000 左右算中等）、有效样本数、胜率等。",
                "tags": [
                    "agencies"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "score",
                                "n_eff",
                                "win_rate",
                                "updated"
                            ],
                            "default": "score"
                        },
                        "description": "排序字段"
                    },
                    {
                        "name": "min_score",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "number"
                        },
                        "description": "最低机构/大V分"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 1,
                            "maximum": 500
                        },
                        "description": "返回条数，默认 50，最大 500"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 0,
                            "minimum": 0
                        },
                        "description": "分页偏移"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "agencies",
                "x-billing": "per-call"
            }
        },
        "/agencies/pit": {
            "get": {
                "operationId": "listAgencyPit",
                "summary": "匿名机构/大V历史截面评分（PIT）",
                "description": "查某一天当时的机构/大V分（PIT＝只用那天已经知道的数据计算，不会“偷看未来”），适合回测。返回不晚于 as_of_date 的最近一个已发布日期的数据。",
                "tags": [
                    "agencies"
                ],
                "parameters": [
                    {
                        "name": "as_of_date",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-10-28"
                        },
                        "description": "截面日期，默认最新面板日"
                    },
                    {
                        "name": "agency_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "pattern": "^AG[0-9A-F]{12}$"
                        },
                        "description": "只看某个匿名机构/大V"
                    },
                    {
                        "name": "min_score",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "number"
                        },
                        "description": "最低机构/大V分"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 1,
                            "maximum": 500
                        },
                        "description": "返回条数，默认 50，最大 500"
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 0,
                            "minimum": 0
                        },
                        "description": "分页偏移"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "agencies",
                "x-billing": "per-call"
            }
        },
        "/agencies/{agency_id}/history": {
            "get": {
                "operationId": "getAgencyHistory",
                "summary": "单个匿名机构/大V的历史评分走势（PIT）",
                "description": "按日期从早到晚，返回这个匿名机构/大V每个发布日的评分。",
                "tags": [
                    "agencies"
                ],
                "parameters": [
                    {
                        "name": "agency_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^AG[0-9A-F]{12}$",
                            "example": "AG0123456789AB"
                        },
                        "description": "匿名机构/大V ID"
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-10-28"
                        },
                        "description": "开始日期"
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-10-28"
                        },
                        "description": "结束日期"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 250,
                            "minimum": 1,
                            "maximum": 1000
                        },
                        "description": "返回条数，默认 250，最大 1000"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "agencies",
                "x-billing": "per-call"
            }
        },
        "/agencies/dates": {
            "get": {
                "operationId": "listAgencyPitDates",
                "summary": "有历史评分（PIT）的日期列表",
                "description": "从新到旧列出已发布的评分日期，以及当天有多少机构/大V。",
                "tags": [
                    "agencies"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 60,
                            "minimum": 1,
                            "maximum": 500
                        },
                        "description": "返回条数，默认 60，最大 500"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "agencies",
                "x-billing": "per-call"
            }
        },
        "/concepts/stocks": {
            "get": {
                "operationId": "listConceptStocks",
                "summary": "概念板块热度：某个概念里哪些股票被提到最多",
                "description": "统计最近一段时间，某个概念下每只股票被提到几次、有多少机构/大V提到（数据约 10 分钟更新一次）。",
                "tags": [
                    "concepts"
                ],
                "parameters": [
                    {
                        "name": "concept",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "固态电池"
                        },
                        "description": "概念名，精确匹配，≤30 字符"
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 30,
                            "minimum": 1,
                            "maximum": 365
                        },
                        "description": "回看天数"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 1,
                            "maximum": 100
                        },
                        "description": "返回条数，默认 50，最大 100"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "concepts",
                "x-billing": "per-call"
            }
        },
        "/concepts/by-stock": {
            "get": {
                "operationId": "listStockConcepts",
                "summary": "个股概念热度：某只股票关联哪些概念最热",
                "description": "统计最近一段时间，某只股票关联的各个概念被提到几次、第一次和最近一次被提到的时间、有多少机构/大V提到。",
                "tags": [
                    "concepts"
                ],
                "parameters": [
                    {
                        "name": "stock_name",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "宁德时代"
                        },
                        "description": "股票简称（与 ts_code 二选一）"
                    },
                    {
                        "name": "ts_code",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "300750.SZ"
                        },
                        "description": "股票代码，如 300750.SZ（与 stock_name 二选一）"
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 90,
                            "minimum": 1,
                            "maximum": 365
                        },
                        "description": "回看天数"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 30,
                            "minimum": 1,
                            "maximum": 200
                        },
                        "description": "返回条数，默认 30，最大 200"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-scope": "concepts",
                "x-billing": "per-call"
            }
        },
        "/account": {
            "get": {
                "operationId": "getAccount",
                "summary": "查余额和用量（不扣钱）",
                "description": "返回余额、单价、预计还能调用几次、今天调用了几次。查这个不扣钱。",
                "tags": [
                    "account"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "成功",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "BAD_REQUEST",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "UNAUTHORIZED / INVALID_API_KEY / KEY_REVOKED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "INSUFFICIENT_BALANCE",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "FORBIDDEN_SCOPE / IP_NOT_ALLOWED / ACCOUNT_DISABLED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "NOT_FOUND",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "RATE_LIMITED / DAILY_QUOTA_EXCEEDED",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "INTERNAL_ERROR",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    }
                },
                "x-billing": "free"
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "Authorization: Bearer lvk_…"
            },
            "apiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            }
        },
        "schemas": {
            "Opinion": {
                "type": "object",
                "description": "一条消息面记录（结构化文字；不含多空观点、不含原文、不含机构/大V真名）",
                "properties": {
                    "opinion_id": {
                        "type": "string",
                        "example": "OP0123456789abcdef",
                        "description": "稳定匿名记录 ID"
                    },
                    "topic_time": {
                        "type": "string",
                        "example": "2026-10-27 09:30:00",
                        "description": "消息时间（北京时间）"
                    },
                    "agency_id": {
                        "type": "string",
                        "nullable": true,
                        "example": "AG0123456789AB",
                        "description": "稳定匿名机构/大V ID"
                    },
                    "agency_score": {
                        "type": "number",
                        "nullable": true,
                        "description": "该机构/大V当前机构/大V分"
                    },
                    "stocks": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "涉及股票"
                    },
                    "concepts": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "涉及概念板块"
                    },
                    "summary": {
                        "type": "string",
                        "nullable": true,
                        "description": "一句话摘要（≤120 字）"
                    },
                    "detail": {
                        "type": "string",
                        "nullable": true,
                        "description": "结构化要点（≤600 字）"
                    }
                }
            },
            "Envelope": {
                "type": "object",
                "required": [
                    "ok",
                    "code",
                    "message",
                    "data",
                    "meta"
                ],
                "properties": {
                    "ok": {
                        "type": "boolean"
                    },
                    "code": {
                        "type": "string",
                        "example": "OK",
                        "description": "成功为 OK，失败为错误码"
                    },
                    "message": {
                        "type": "string"
                    },
                    "data": {
                        "nullable": true,
                        "description": "业务数据；失败时为 null"
                    },
                    "meta": {
                        "$ref": "#/components/schemas/Meta"
                    },
                    "error": {
                        "type": "object",
                        "nullable": true,
                        "description": "失败时的附加细节"
                    }
                }
            },
            "Meta": {
                "type": "object",
                "properties": {
                    "api_version": {
                        "type": "string",
                        "example": "v1"
                    },
                    "request_id": {
                        "type": "string",
                        "example": "req_0123456789abcdef"
                    },
                    "server_time": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "billing": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                            "charged_yuan": {
                                "type": "string",
                                "example": "0.005"
                            },
                            "balance_yuan": {
                                "type": "string",
                                "example": "99.995"
                            }
                        }
                    }
                }
            }
        }
    }
}