Monarch Money Community
Python library for accessing Monarch Money data.
Installation
From Source Code
Clone this repository from Git
git clone https://github.com/bradleyseanf/monarchmoneycommunity.git
Via pip
pip install monarchmoneycommunity
Import the library as monarchmoney after installation.
This package pins gql to 4.0.
Instantiate & Login
There are two ways to use this library: interactive and non-interactive.
Interactive
If you're using this library in something like iPython or Jupyter, you can run an interactive-login which supports multi-factor authentication:
from monarchmoney import MonarchMoney
mm = MonarchMoney()
await mm.interactive_login()
This will prompt you for the email, password and, if needed, the multi-factor token.
Non-interactive
For a non-interactive session, you'll need to create an instance and login:
from monarchmoney import MonarchMoney
mm = MonarchMoney()
await mm.login(email, password)
This may throw a RequireMFAException. If it does, you'll need to get a multi-factor token and call the following method:
from monarchmoney import MonarchMoney, RequireMFAException
mm = MonarchMoney()
try:
await mm.login(email, password)
except RequireMFAException:
await mm.multi_factor_authenticate(email, password, multi_factor_code)
Alternatively, you can provide the MFA Secret Key. The MFA Secret Key is found when setting up the MFA in Monarch Money by going to Settings -> Security -> Enable MFA -> and copy the Two-factor text code. Then provide it in the login() method:
from monarchmoney import MonarchMoney, RequireMFAException
mm = MonarchMoney()
await mm.login(
email=email,
password=password,
save_session=False,
use_saved_session=False,
mfa_secret_key=mfa_secret_key,
)
Use a Saved Session
You can easily save your session for use later on. While we don't know precisely how long a session lasts, authors of this library have found it can last several months.
from monarchmoney import MonarchMoney, RequireMFAException
mm = MonarchMoney()
mm.interactive_login()
# Save it for later, no more need to login!
mm.save_session()
Once you've logged in, you can simply load the saved session to pick up where you left off.
from monarchmoney import MonarchMoney, RequireMFAException
mm = MonarchMoney()
mm.load_session()
# Then, start accessing data!
await mm.get_accounts()
Accessing Data
As of writing this README, the following methods are supported:
Non-Mutating Methods
| Method | Description |
|---|---|
get_accounts |
gets the default account list linked to Monarch Money; use get_account_roster() to include deleted and hidden account identities explicitly |
get_account_holdings |
gets all of the securities in a brokerage or similar type of account |
get_goal_accounts_allocation_summary |
gets each goal account's total balance, unallocated balance, and split by Savings Goal |
get_all_holdings |
gets the securities in every brokerage or similar type of account in one call (no parameters) — example: await mm.get_all_holdings() |
get_account_type_options |
all account types and their subtypes available in Monarch Money |
get_account_history |
gets all daily account history for the specified account |
get_account_details(account_id) |
gets the full UI-selected account metadata, settings, notes, provider/owner details, goals, equity data, and daily snapshots; account_id accepts a string or integer. Returns account and snapshotsForAccount without changing get_account_history() |
get_account_roster(include_deleted=True, include_hidden=True) |
gets account identities from institution settings, including deletedAt, owner, and visibility. Boolean flags control deleted/hidden inclusion. Deleted identities may be inaccessible through the account detail endpoint |
get_merchants(limit=100, offset=0, include_merchants_without_transactions=True) |
gets one offset page with full UI-selected merchant settings, default category/application mode, recurrence, rule count, and merchantCount. limit must be positive; offset must be nonnegative |
get_all_merchants(limit=100, include_merchants_without_transactions=True) |
collects offset pages until a short or empty page; rejects duplicate merchant IDs with monarchmoney.read_types.MerchantPaginationError. Returns merchants and the first page's reported merchantCount, which can differ from the number collected |
get_retail_transactions(first=100, after_cursor=None, filters=None) |
gets one retailTransactionsConnection page, preserving edges, pageInfo, line items, orders, and transaction/category links. Positive integer first controls page size; after_cursor is an opaque string; filters is a GraphQL RetailTransactionFiltersInput dictionary |
get_activity_events(first=100, after_cursor=None, exclude_event_types=None) |
gets one activityEvents page without marking notifications read. Positive integer first controls page size; after_cursor is an opaque string; exclude_event_types accepts a list of GraphQL ActivityEventType enum names |
get_user_profile() |
gets me with the profile, preferences, onboarding information, and account access metadata selected by the web UI; no parameters |
get_household_preferences() |
gets householdPreferences, insightTopics, budgetSystem, and budgetApplyToFutureMonthsDefault; no parameters |
get_report_configurations() |
gets saved reportConfigurations, including complete UI-selected transaction filters and report views; no parameters |
get_recurring_transaction_streams(include_liabilities=True) |
gets recurringTransactionStreams definitions, review/active status, schedules, next forecast, category, and account. The boolean flag controls liability inclusion; pending streams are included. Preserves inactive records when returned, but the web queries do not establish ignored/deleted stream coverage. Not a complete occurrence history |
get_institutions |
gets institutions linked to Monarch Money |
get_budgets |
all the budgets and the corresponding actual amounts |
get_savings_goals |
gets all Savings Goals, including archived ones (filter on status == "archived" or archivedAt) |
get_savings_goal |
gets a single Savings Goal by id |
get_credit_history |
gets credit score snapshots and Spinwheel user details |
get_subscription_details |
gets the Monarch Money account's status (e.g. paid or trial) |
get_recurring_transactions |
gets the future recurring transactions, including merchant and account details |
get_savings_goal_budget_amounts |
gets a savings goal's planned, actual, and remaining amounts per month (with per-account breakdown) between two months |
get_transactions_summary |
gets the transaction summary data from the transactions page |
get_transactions |
gets transaction data, defaults to returning the last 100 transactions; can also be searched by date range |
find_duplicate_transactions |
finds duplicate transaction groups using Plaid-reported fields |
get_transaction_categories |
gets all of the categories configured in the account |
get_transaction_category_groups |
all category groups configured in the account |
get_household_members |
gets household member IDs, names, display names, and roles |
get_transaction_details |
gets detailed transaction data for a single transaction |
get_transaction_splits |
gets transaction splits for a single transaction |
get_savings_goal_events |
gets a Savings Goal's paginated event history (contributions, withdrawals), optionally filtered by start_date/end_date |
get_transaction_tags |
gets all of the tags configured in the account |
get_transaction_rules |
gets all transaction rules configured in the account, in priority order |
get_cashflow |
gets cashflow data (by category, category group, merchant and a summary) |
get_cashflow_summary |
gets cashflow summary (income, expense, savings, savings rate) |
get_goal_options |
gets the preset Savings Goal templates (Emergency fund, Down payment, Custom, ...) |
is_accounts_refresh_complete |
gets the status of a running account refresh |
Read-Only Export Examples
These methods use the same authenticated client as the existing getters and return JSON-compatible dictionaries. Single-page methods preserve the server response and do not silently fetch subsequent pages.
roster = await mm.get_account_roster(include_deleted=True, include_hidden=True)
account = await mm.get_account_details("account-id")
merchant_page = await mm.get_merchants(limit=100, offset=0)
merchants = await mm.get_all_merchants(limit=100)
profile = await mm.get_user_profile()
preferences = await mm.get_household_preferences()
reports = await mm.get_report_configurations()
streams = await mm.get_recurring_transaction_streams(include_liabilities=True)
retail = await mm.get_retail_transactions(first=100, filters=None)
while retail["retailTransactionsConnection"]["pageInfo"]["hasNextPage"]:
retail = await mm.get_retail_transactions(
first=100,
after_cursor=retail["retailTransactionsConnection"]["pageInfo"]["endCursor"],
filters=None,
)
activity = await mm.get_activity_events(first=100, exclude_event_types=[])
while activity["activityEvents"]["pageInfo"]["hasNextPage"]:
activity = await mm.get_activity_events(
first=100,
after_cursor=activity["activityEvents"]["pageInfo"]["endCursor"],
exclude_event_types=[],
)
Process or save each cursor page before fetching the next one. Pass the same filters/exclusions on every page. Only get_all_merchants() collects all pages automatically. With merchants that have no transactions included, the collected list can exceed merchantCount; the helper never treats that reported count as an export limit or claims equality. Offset pagination assumes the merchant list remains stable while scanning; overlapping/repeated IDs raise an error rather than returning an apparently complete export.
get_account_roster() is an identity roster, not a replacement for get_accounts() metadata. Use its IDs to request details, preserving null responses or access errors for deleted accounts instead of silently excluding them. get_account_details() leaves account and snapshotsForAccount unchanged; the older get_account_history() still returns its enriched snapshot list. Recurring stream definitions and their next forecasts are separate from the date-bounded calendar returned by get_recurring_transactions().
Mutating Methods
| Method | Description |
|---|---|
delete_transaction_category |
deletes a category for transactions |
delete_transaction_categories |
deletes a list of transaction categories for transactions |
update_transaction_category(category_id, name=None, icon=None, group_id=None) |
updates a category by its required string category_id. Optional string parameters are name (new name), icon (unicode string or emoji), and group_id (destination group id from get_transaction_category_groups()). Fields set to None are omitted from the request. Example: await mm.update_transaction_category("cat-1", name="Groceries", icon="🛒", group_id="grp-2"). To move only the group: await mm.update_transaction_category("cat-1", group_id="grp-2"). Returns the updated category, including its group. |
create_transaction_category |
creates a category for transactions |
create_transaction_rule |
creates a transaction rule that sets a category for transactions matching merchant, amount, category, or account criteria |
update_transaction_rule |
updates a transaction rule. Reads the current rule and resends its criteria, category action, merchant rename, and tags, because Monarch silently ignores partial rule updates. Required: rule_id (str, from get_transaction_rules()). Optional replacements: set_category_id (str or None), merchant_criteria (list of operator/value dicts or None), merchant_criteria_use_original_statement (bool or None), amount_criteria (dict or None), category_ids and account_ids (lists of ids or None). Omitted replacements keep their current values. Explicit None sends GraphQL null to clear nullable fields. False and empty lists are sent unchanged. apply_to_existing_transactions (bool, default False) also applies the rule to past matches. Example: await mm.update_transaction_rule("rule-1", set_category_id="category-2"). To clear the amount criterion: await mm.update_transaction_rule("rule-1", amount_criteria=None). Returns the updated rule's id in a dict. Raises RequestFailedException for a missing rule, payload errors, or a silent no-op. Rules with unsupported criteria or actions raise NotImplementedError before the update request. |
request_accounts_refresh |
requests a synchronization / refresh of all accounts linked to Monarch Money. This is a non-blocking call. If the user wants to check on the status afterwards, they must call is_accounts_refresh_complete. |
request_accounts_refresh_and_wait |
requests a synchronization / refresh of all accounts linked to Monarch Money. This is a blocking call and will not return until the refresh is complete or no longer running. |
create_transaction |
creates a transaction with the given attributes |
update_transaction |
modifies one or more attributes for an existing transaction |
delete_merchant |
deletes a merchant by id. Pass move_to_merchant_id to merge it into another merchant first (Monarch's "Merge & delete"), e.g. await mm.delete_merchant("170000000000000001", move_to_merchant_id="170000000000000002") |
archive_savings_goal |
archives a savings goal by id. Monarch withdraws the goal's allocated funds and removes it from future budgets; history is kept |
unarchive_savings_goal |
unarchives a savings goal by id (funds withdrawn on archive are not restored) |
update_reoccuring |
updates recurring merchant settings (frequency, amount, date, active status) |
delete_transaction_rule(rule_id) |
deletes a transaction rule by its required string rule_id from get_transaction_rules(). Example: await mm.delete_transaction_rule("rule-1"). Returns True when the payload has no errors, even if deleted is False. Raises RequestFailedException for payload errors. |
delete_transaction |
deletes a given transaction by the provided transaction id |
update_transaction_splits |
modifies how a transaction is split (or not) |
create_transaction_tag |
creates a tag for transactions |
set_transaction_tags |
sets the tags on a transaction |
set_budget_amount |
sets a budget's value to the given amount (date allowed, will only apply to month specified by default). A zero amount value will unset or clear the budget for the given category. |
set_savings_goal_budget_amount |
sets a savings goal's planned contribution for a month (applies to future months by default). Pass account_id for a per-account contribution; omit it for the general contribution |
update_flexible_budget |
updates the Flexible budget bucket amount for a month |
update_flex_rollover_settings |
updates the Flex rollover settings, including the start month and starting balance |
reset_budget |
resets the budget for a month back to its defaults |
create_manual_account |
creates a new manual account |
delete_account |
deletes an account by the provided account id |
update_account |
updates settings and/or balance of the provided account id |
upload_account_balance_history |
uploads account history csv file for a given account |
upload_attachment |
uploads a binary file for a given transaction by the provided transaction id |
upload_receipt_to_inbox(file_content, filename) |
uploads a receipt image to the Monarch general receipt inbox (not attached to a specific transaction), triggering Monarch's AI to auto-categorize and match it |
Typed Client
If you want typed account, budget, subscription, and holdings models, import the typed client:
from typedmonarchmoney import TypedMonarchMoney
mm = TypedMonarchMoney()
accounts = await mm.get_accounts()
The typed client provides MonarchAccount, MonarchBudget, MonarchBudgetMonth, MonarchSubscription, MonarchCashflowSummary, and MonarchHoldings models.
Contributing
Any and all contributions - code, documentation, feature requests, feedback - are welcome!
If you plan to submit up a pull request, you can expect a timely review. There aren't any strict requirements around the environment you'll need.
Opening a pull request
This library requires a pre-push check requiring that you log into your Monarch account and test all NON-MUTATING methods return valid JSON data including those of new types. If any fail, the push fails.
# One-time setup
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
make install-hooks
# Automatically runs run_tests.py before pushing
git push
FAQ
How do I use this API if I login to Monarch via Google?
If you currently use Google or 'Continue with Google' to access your Monarch account, you'll need to set a password to leverage this API. You can set a password on your Monarch account by going to your security settings.
Don't forget to use a password unique to your Monarch account and to enable multi-factor authentication!
Projects Using This Library
Open a PR adjusting the README if you would like to be added to this list
Disclaimer: These projects are neither affiliated nor endorsed by Monarch Money.
- mmoney-cli - Access your MonarchMoney data via CLI
- monarchmoney-typed - MonarchMoney Home Assistant Integration
- monarch-mcp-server - Model Context Protocol (MCP) server for integrating with Monarch Money.
Metadata
Release files for monarchmoneycommunity 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| monarchmoneycommunity-1.7.0.tar.gz | 75.1 kB | With provenance | Details for monarchmoneycommunity-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| monarchmoneycommunity-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for monarchmoneycommunity-1.7.0-py3-none-any.whl |
Total release size: 127.7 kB
Release files / monarchmoneycommunity-1.7.0.tar.gz
| Download URL | monarchmoneycommunity-1.7.0.tar.gz |
|---|---|
| Size | 75.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
892d43cb54b222d86e0e3a80ba60ee527271d592d7cf0428b589c93b5542fdf2
|
|
BLAKE2b-256 checksum How to use checksums |
3e1c8605d7aaaaf6475c0cccec577a56c3525753368713b3f68e50cab4bef9ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / monarchmoneycommunity-1.7.0-py3-none-any.whl
| Download URL | monarchmoneycommunity-1.7.0-py3-none-any.whl |
|---|---|
| Size | 52.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62cccaa23aee0de22138ef8faee08b0512d3a43cc9709037b089045489b96e6d
|
|
BLAKE2b-256 checksum How to use checksums |
f6010ca8b5a4bc67af860705538de3e00f6aacfb1fc0fec3cecb40130ee8c22a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logSecurity for monarchmoneycommunity 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for monarchmoneycommunity-1.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.