> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forevex.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /analyze/:wallet

> 返回完整 AnalyzeReport JSON（`application/json`）。路径参数为 Polygon 上 `0x` 钱包地址，一般无需对 `0x` 再做 URL 编码。查询参数与 CLI `analyze` 的当次开关一致。

完整 **`AnalyzeReport`** JSON，与 CLI **`analyze <wallet>`** 在相同配置与查询参数下语义一致。

## 路径

* **`wallet`**：`0x` 开头的地址；直接写在路径中即可，避免破坏路径的额外编码。

## 与 CLI 对齐的查询参数（可选）

| 参数                                          | 说明       |
| ------------------------------------------- | -------- |
| `no_cache`                                  | 跳过报告缓存   |
| `with_subgraph` / `no_subgraph`             | 子图开关     |
| `subgraph_cap_rows`                         | 子图每流行数上限 |
| `with_reconciliation` / `no_reconciliation` | 对账开关     |
| `with_canonical` / `no_canonical`           | 规范层落库开关  |
| `no_persist_raw`                            | 当次不写 raw |

布尔值常用 **`true`** / **`false`**。

## 示例

```bash theme={null}
curl -s "http://127.0.0.1:3000/analyze/0x5924ca480d8b08cd5f3e5811fa378c4082475af6" | jq .
curl -s "http://127.0.0.1:3000/analyze/0x5924ca480d8b08cd5f3e5811fa378c4082475af6?no_cache=true" | jq .
curl -s "http://127.0.0.1:3000/analyze/0x5924ca480d8b08cd5f3e5811fa378c4082475af6?with_subgraph=true&with_reconciliation=true" | jq .
```

## 未提供 HTTP 的能力

**`report-from-canonical-run`**、**`export-ambiguous`**、**`set-ambiguous-review`** 等仅支持 CLI；无对应 REST 路由。


## OpenAPI

````yaml GET /analyze/{wallet}
openapi: 3.1.0
info:
  title: Polymarket Account Analyzer API
  description: >-
    只读 REST API：钱包分析报告（AnalyzeReport JSON）与榜单。由 `polymarket-account-analyzer
    serve` 提供。
  version: 1.0.0
servers:
  - url: http://127.0.0.1:3000
    description: 本地默认（serve --bind 127.0.0.1:3000）
security: []
paths:
  /analyze/{wallet}:
    get:
      summary: 分析钱包
      description: >-
        返回完整 AnalyzeReport JSON（`application/json`）。路径参数为 Polygon 上 `0x`
        钱包地址，一般无需对 `0x` 再做 URL 编码。查询参数与 CLI `analyze` 的当次开关一致。
      parameters:
        - name: wallet
          in: path
          required: true
          description: 钱包地址，例如 0x5924…
          schema:
            type: string
        - name: no_cache
          in: query
          description: 为 true 时跳过 Postgres 报告缓存
          schema:
            type: boolean
        - name: with_subgraph
          in: query
          description: 当次启用 Goldsky 子图拉取
          schema:
            type: boolean
        - name: no_subgraph
          in: query
          description: 当次关闭子图
          schema:
            type: boolean
        - name: subgraph_cap_rows
          in: query
          description: 子图每条流最大行数封顶（整数）
          schema:
            type: integer
            minimum: 0
        - name: with_reconciliation
          in: query
          description: 当次启用对账摘要
          schema:
            type: boolean
        - name: no_reconciliation
          in: query
          description: 当次关闭对账
          schema:
            type: boolean
        - name: with_canonical
          in: query
          description: 当次启用规范层合并并写 PG（需数据库）
          schema:
            type: boolean
        - name: no_canonical
          in: query
          description: 当次关闭规范层
          schema:
            type: boolean
        - name: no_persist_raw
          in: query
          description: 当次不写 raw 表
          schema:
            type: boolean
      responses:
        '200':
          description: AnalyzeReport JSON（schema_version 2.x）
          content:
            application/json:
              schema:
                type: object
                description: >-
                  结构化报告，含
                  lifetime、market_distribution、strategy_inference、frontend 等字段
                additionalProperties: true

````