---
title: "Spending"
method: GET
path: "/api/transactions/spending"
tags: ["Transactions"]
---

# Spending

`GET /api/transactions/spending`

Aggregated spending bucketed by period (daily/weekly/monthly). Covers credit and depository outflows; honors per-tx and per-category insight exclusions.

## Query parameters

- `accountId` string
- `accountType` 'credit' | 'depository' | 'all'
- `period` '1w' | '1m' | '3m' | '6m' | '1y' | 'all', required

## Response `200`

Aggregated spending

- CreditSpendingResponse
  - `averageLabel` 'daily' | 'weekly' | 'monthly' | 'yearly', required
  - `averageSpending` number, required
  - `spending` SpendingBucket[], required
    - `amount` number, required
    - `date` string, required
  - `totalSpending` number, required

## Other responses

- `401` — Unauthorized
- `403` — Subscription required
- `422` — Validation failed

---

[API](https://skmtc.net/cobaltpf/apis/cobalt-api.md) · [All operations](https://skmtc.net/cobaltpf/apis/cobalt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cobaltpf/cobalt-api/revisions/8ef0dfb5d23c/schema)
