---
title: "GET /v1/console/wallet/consumption-summary"
method: GET
path: "/v1/console/wallet/consumption-summary"
tags: ["WalletService"]
---

# GET /v1/console/wallet/consumption-summary

`GET /v1/console/wallet/consumption-summary`

GetConsumptionSummary 按时间分桶汇总当前用户消费（与 consumed_micros 同口径：
 direction='debit' 全量出账）。供前端消费统计图表使用，避免前端用分页流水现算导致与
 余额卡「累计消费」对不上账。

## Query parameters

- `granularity` string
- `buckets` integer

## Response `200`

OK

- WalletV1GetConsumptionSummaryReply
  - `buckets` WalletV1ConsumptionBucket[] — buckets 按时间升序排列，缺失区间补 0，长度等于请求的桶数。
    - `amountMicros` string — amount_micros 该桶内 direction='debit' 出账之和（微单位）。
    - `bucket` string — bucket 桶起始本地日期标签：day 为 YYYY-MM-DD，month 为 YYYY-MM。
  - `granularity` string — granularity 实际生效的粒度（回显，便于前端校验）。
  - `totalMicros` string — total_micros 返回窗口内所有桶之和（微单位）。注意这是「窗口内」总额， 与余额卡 consumed_micros（全期全量）口径相同但时间范围不同。

---

[API](https://skmtc.dev/apiqik/apis/apiqik-api.md) · [All operations](https://skmtc.dev/apiqik/apis/apiqik-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apiqik/apiqik-api/revisions/e06b96127408/schema)
