Skip to main content
Version: 0.1.21 (Current)

get_cashflow

Type: query

Gets all the categories configured in the account.

Signature

async def get_cashflow(
limit: int = DEFAULT_RECORD_LIMIT,
start_date: str | None = None,
end_date: str | None = None
) -> Dict[str, Any]

Parameters

ParameterTypeRequiredDescription
limitintNo-
start_date`strNone`No
end_date`strNone`No

Example

from monarchmoney import MonarchMoney

mm = MonarchMoney()
await mm.login(email, password)

result = await mm.get_cashflow()
print(result)

GraphQL Operation

Operation Name: Web_GetCashFlowPage

GraphQL Query

query Web_GetCashFlowPage($filters: TransactionFilterInput) {
byCategory: aggregates(filters: $filters, groupBy: ["category"]) {
groupBy {
category {
id
name
group {
id
type
__typename
}
__typename
}
__typename
}
summary {
sum
__typename
}
__typename
}
byCategoryGroup: aggregates(filters: $filters, groupBy: ["categoryGroup"]) {
groupBy {
categoryGroup {
id
name
type
__typename
}
__typename
}
summary {
sum
__typename
}
__typename
}
byMerchant: aggregates(filters: $filters, groupBy: ["merchant"]) {
groupBy {
merchant {
id
name
logoUrl
__typename
}
__typename
}
summary {
sumIncome
sumExpense
__typename
}
__typename
}
summary: aggregates(filters: $filters, fillEmptyValues: true) {
summary {
sumIncome
sumExpense
savings
savingsRate
__typename
}
__typename
}
}

Try It Out

To test this API method locally:

  1. Install the package: pip install monarchmoney
  2. Create a Python script with the example code above
  3. Replace email and password with your Monarch Money credentials
  4. Run the script

See the Authentication Guide for details on logging in.