Get Spending Analysis
Get spending analysis for the authenticated user (v2, ClickHouse-backed).
Returns categorized spending breakdown with totals. Returns empty lists when no transactions match. Reads from ClickHouse instead of Core API for improved performance and correctness.
Double aggregation: Use group_by=time_period with secondary_group_by=category
or secondary_group_by=merchant to get a breakdown within each time period (top 10 + “Other”).
The end_date is capped at today if it is in the future or omitted.
Note: Transactions from INVESTMENT-type accounts (brokerage, crypto, IRA, etc.) are
always excluded — stock purchases, short sales, dividend reinvestments, and margin interest
are not personal spending. Passing an investment account_id in account_ids will
therefore return empty results for that account.
DEBIT transfers to investment platforms (Wealthfront, Robinhood, Fidelity, Schwab, Vanguard, Coinbase, etc.) are also excluded even when the investment account itself is not connected. The matching uses merchant name and description patterns, guarded against known false positives (e.g. “Les Schwab Tires”, “Fidelity Life Insurance”). CREDITs from these platforms (withdrawals, dividends) are kept — they are real cashflow into the user’s spending accounts.
Authorizations
Bearer authentication with a personal access token (prefix pat_). Generate tokens in the Truv web app under Settings → API keys.
Query Parameters
category, merchant, time_period day, week, month, quarter, year category, merchant Response
Spending analysis with optional double aggregation (v2).
Spending analysis response with optional double aggregation.
Wraps the Truv API response and adds by_time_period with breakdown when
secondary_group_by is specified.
Spending data from Truv API.
Summary statistics from Truv API.
Unique request identifier.
Analysis creation timestamp.
Time periods with category/merchant breakdown. Only present when group_by=time_period and secondary_group_by is set.
Whole-window CREDIT total on the same hide-aware basis as the spending side (same hide, internal-transfer, and investment exclusions; scoped by link_id and account_ids). It is a whole-window figure and is NOT narrowed by the categories breakdown filter or the include_income flag. Null on the legacy v1 endpoint, which does not compute cash flow.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$"4345.00"
Whole-window DEBIT total on the same basis as total_income. Pairs with total_income to derive the savings rate. Unlike summary.total_spending it is never signed against income and is not narrowed by the categories filter, so use this (not summary.total_spending) when displaying the savings rate. Null on the legacy v1 endpoint.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$"10550.00"
(total_income minus total_expenses) as a percentage of total_income, one decimal place. Can be negative when expenses exceed income. Null when total_income is zero or negative (undefined) or on the legacy v1 endpoint.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$"-142.8"