## 账户流水 (`ledger-entries`)

账户余额的每一笔变动,每条带记账后的余额快照。

鉴权: 用户（部分参数仅管理员） · 文档: https://www-demo.kuxitong.com/zh/docs/api/ledger-entries

### GET `/api/v2/ledger-entries`

列出账户流水 · 鉴权: 用户（部分参数仅管理员）

查询参数:

| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `page` | integer |  | 页码,从 1 开始。 默认: 1 |
| `page_size` | integer |  | 每页条数。 默认: 20 |
| `sort` | string |  | 排序字段,逗号分隔,前缀 `-` 表示降序,如 `-created_at,id`。 |
| `tenant_id` | integer |  | 仅管理员可用:按租户过滤。租户凭据调用时忽略,只返回本租户数据。 |
| `kind` | string |  | 按流水类别过滤。 |
| `start` | string |  | 记账时间起(含),RFC 3339。 |
| `end` | string |  | 记账时间止(不含),RFC 3339。 |

```sh
curl "https://panel.example.com/api/v2/ledger-entries" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

账户流水对象:

| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `amount_cents` | integer |  | 带符号:正为入账,负为扣款。 |
| `balance_after_cents` | integer |  | 记这一笔后的余额快照。 |
| `created_at` | string |  | 创建时间 |
| `des` | string |  | 备注说明 |
| `id` | integer |  | 记录 ID |
| `kind` | string |  | 流水类型,如充值、扣款。 |
| `order_id` | integer |  | 关联订单 ID;没有为空。 |
| `tenant_id` | integer |  | 所属租户(用户)ID |
