# 股权质押汇总

- 接口：stock_pledge_summary
- 路径：/api/v1/market/data/pledge/pledge-summary
- 方法：GET
- 描述：股权质押 A 股市场历史总览，按交易日期倒序返回 A 股质押总比例、质押公司数量、质押笔数、质押总股数、质押总市值、沪深 300 指数及周涨跌幅。响应为 `code/message/data` 分页结构。
- 数据范围：全市场历史汇总记录，按 `trade_date` 倒序
- 单次限量：分页默认 `page=1`、`page_size=50`
- 提示：
  - 仅支持 `page` / `page_size` 分页，不支持按股票代码或最新期筛选。
  - 全市场总量维度，非个股。
  - 金额类字段序列化为字符串（保留精度）。

## 输入参数

| 名称 | 类型 | 必选 | 描述 |
|------|------|------|------|
| page | integer | N | 页码，默认 1 |
| page_size | integer | N | 每页条数，默认 50 |

## 输出参数
成功响应外层固定为 `code`、`message`、`data`：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| code | integer | Y | HTTP 状态码；成功固定为 200 |
| message | string | Y | 成功固定为 `success`；失败时为中文错误信息 |
| data | object / null | Y | 成功时为业务数据对象；失败时为 `null`。其字段如下 |


data 对象：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| pageNum | integer | Y | 当前页码 |
| pageSize | integer | Y | 每页条数 |
| total | integer | Y | 总记录数 |
| pages | integer | Y | 总页数 |
| records | array | Y | 市场质押总览列表 |

records 数组：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| trade_date | string | Y | 交易日期 |
| pledge_total_ratio | string | Y | A 股质押总比例（%） |
| pledge_company_count | integer | Y | 质押公司数量 |
| pledge_deal_count | integer | Y | 质押笔数 |
| pledge_total_shares | string | Y | 质押总股数（股） |
| pledge_total_market_value | string | Y | 质押总市值（元） |
| hs300_index | string | Y | 沪深 300 指数 |
| hs300_week_change_ratio | string | Y | 沪深 300 周涨跌幅（%） |

## 接口示例

```bash
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/pledge/pledge-summary?page=1&page_size=10"
```

Python（[`ftshare`](https://github.com/FTShare-Lab/FTShare-python-sdk.git) SDK，方法 `market.pledge_summary`，默认返回 pandas `DataFrame`）：

```python
import ftshare as ft

market = ft.market_api()

# 默认返回 DataFrame（无入参，返回全市场股权质押周度汇总）
df = market.pledge_summary(page=1, page_size=5)
print(df.shape, list(df.columns))
# (5, 8) ['trade_date', 'pledge_total_ratio', 'pledge_company_count', 'pledge_deal_count',
#         'pledge_total_shares', 'pledge_total_market_value', 'hs300_index', 'hs300_week_change_ratio']
print(df.head(3))
#    trade_date  pledge_total_ratio pledge_company_count pledge_deal_count pledge_total_shares
# 0  2026-06-18  0                  2235                 13224             285099546300
# 1  2026-06-12  0                  2242                 13236             283799065700

# limit 跨页取数
df = market.pledge_summary(limit=20)

# 返回原始 JSON 信封
payload = market.pledge_summary(page=1, page_size=5, raw=True)
```

## 数据样例

股权质押汇总（节选）：

| trade_date | pledge_total_ratio | pledge_company_count |
|------------|--------------------|----------------------|
| 2026-06-12 | 0 | 2242 |
| ... | ... | ... |
