# 货币供应

- 接口：consumer_money_supply_monthly
- 路径：/api/v1/market/data/economic/china-money-supply
- 方法：GET
- 描述：查询中国货币供应量（M0/M1/M2）月度数据。按月份返回 M2、M1、M0 各自的当月数量、同比和环比；业务数据在 `data.records` 中按月份倒序分页返回。
- 数据范围：宏观经济月度数据
- 单次限量：默认 `page=1`、`page_size=50`；`page_size` 最大 200
- 提示：
  - `month` 格式化为「YYYY年MM月份」。
  - 数值在 JSON 中以字符串返回。
  - 当前数据中的 `unit` 和 `currency` 可能为空字符串，不能仅依赖这两个字段判断数量单位和币种。

## 输入参数

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


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

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

data 对象：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| items | array | Y | 货币供应记录列表 |
| total_items | integer | Y | 总记录数 |
| total_pages | integer | Y | 总页数 |

items 数组：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| month | string | Y | 月份，格式「YYYY年MM月份」 |
| m2_current | string | Y | M2 当月数量 |
| m2_yoy | string | Y | M2 同比（%） |
| m2_mom | string | Y | M2 环比（%） |
| m1_current | string | Y | M1 当月数量 |
| m1_yoy | string | Y | M1 同比（%） |
| m1_mom | string | Y | M1 环比（%） |
| m0_current | string | Y | M0 当月数量 |
| m0_yoy | string | Y | M0 同比（%） |
| m0_mom | string | Y | M0 环比（%） |
| unit | string | Y | 货币单位；当前数据可能返回空字符串 |
| currency | string | Y | 货币种类；当前数据可能返回空字符串 |

## 接口示例

```bash
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/economic/china-money-supply?page=1&page_size=50"
```

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

```python
import ftshare as ft

market = ft.market_api()

# 返回第一页 DataFrame（按时间倒序）
df = market.consumer_money_supply_monthly(page=1, page_size=50)
print(df[["month", "m2_current", "m2_yoy", "m1_current", "m1_yoy"]].head(3))

# 返回原始 JSON
payload = market.consumer_money_supply_monthly(page=1, page_size=50, raw=True)

# 返回 list[dict]（非 DataFrame）
rows = market.consumer_money_supply_monthly(page=1, page_size=50, as_dataframe=False)

```

## 数据样例

全量月度序列按月份降序返回。以下为 2026年05月份的历史数据样例，最新月份会随数据更新而变化：

| month | m2_current | m2_yoy | m1_current | m1_yoy |
|-------|------------|--------|------------|--------|
| 2026年05月份 | 3536688.92 | 8.6 | 1148891.41 | 5.5 |
| ... | ... | ... | ... | ... |
