cash_flow
Calculate net cash inflows and outflows for a given period across bank and cash accounts, with options to filter internal transfers and group by month, quarter, or year.
Instructions
Calculate cash flow (inflows and outflows) for a period.
Scope is BANK and CASH accounts by default. Credit-card and
investment movements are not cash flow (they're liability /
asset changes — use balance_sheet). An explicit account=
of any type works but the default scope is narrow.
Internal transfers (transactions with no INCOME or EXPENSE
leg — transfer to savings, currency wallet shuffle, paying
a credit card from checking) are filtered by default. The
default totals answer "where did money come from and where
did it go?" rather than "every debit and credit." Pass
include_transfers=true for the gross flow (e.g. for
reconciling against a bank statement).
Args: start_date: Start of period (YYYY-MM-DD) end_date: End of period (YYYY-MM-DD) account: Optional specific account to analyze (defaults to all cash/bank accounts) include_transfers: When False (default), filter internal transfers. When True, include every cash/bank movement regardless of category. group_by: Optional "month", "quarter", or "year" — split the range into sub-period columns and return an Inflows / Outflows / Net trend table (TSV).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | ||
| end_date | Yes | ||
| group_by | No | ||
| start_date | Yes | ||
| include_transfers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |