Skip to main content

Focused unofficial Monarch Money Python client.

Project description

monarch-api

Focused unofficial Monarch Money Python client.

The package stays close to recovered REST and GraphQL operations instead of adding a heavy abstraction layer. Public methods are organized by domain and generally map one endpoint or operation to one Python method.

Install

pip install monarch-api

For local development:

pip install -e .[dev]

Example

from monarch_api import MonarchClient

with MonarchClient() as client:
    client.auth.login(
        username="you@example.com",
        password="secret",
        totp="123456",
    )

    me = client.auth.get_me()
    accounts = client.accounts.page()
    transactions = client.transactions.list(limit=10)
    transaction = client.transactions.get(transactions["results"][0]["id"])

Notes

  • Sync-only client.
  • Returns raw JSON-like dict/list payloads shaped closely to Monarch responses.
  • Prefers direct endpoint mapping over higher-level helper abstractions.
  • Implemented surface is limited to operations backed by captured requests or recovered documents.

Implemented Surface

auth

  • login(username, password, totp=None, trusted_device=True, supports_mfa=True, supports_email_otp=True, supports_recaptcha=True)
  • use_token(token, device_uuid=None)
  • get_me()
  • save_session(path)
  • load_session(path)

REST coverage:

  • POST /auth/login/
  • GET /users/me/

household

  • get()
  • members()
  • preferences()

accounts

  • has_accounts()
  • active_institution_notices()
  • aggregate_snapshots(filters=None)
  • syncing_status()
  • latest_force_refresh_operation()
  • force_refresh_operation(operation_id)
  • force_refresh_account_status(account_id)
  • display_balance_at_date(date, filters=None)
  • snapshots_by_account_type(start_date, timeframe, filters=None)
  • page(filters=None)
  • recent_balances(start_date=None)
  • filtered(filters=None)
  • filters()
  • account_types()
  • institution_settings()
  • force_refresh_account(input_data)
  • force_refresh_all(input_data=None)
  • institutions(ids=None, include_logo=None)
  • institution(institution_id)

subscription

  • details()
  • subscription()
  • modal(promo_code=None, stripe_price_id="")
  • premium_upgrade_plans(promo_code=None, referral_code=None, selected_plan_id=None)
  • trial_status()
  • entitlements()
  • feature_entitlement_params()
  • plus_tier_access()
  • gifted_subscriptions()
  • referral_settings(statistics_start_date, statistics_end_date, v1_payout_method, v2_payout_method)

settings

  • user_profile_flags()
  • dashboard_config()
  • oldest_deletable_synced_snapshot_date()
  • oldest_deletable_transaction_date(include_synced=False, include_uploaded=False, include_manual=False)
  • sidebar_data(promo_code=None)
  • household_member_settings()
  • security_settings()
  • notification_preferences()
  • review_summary_by_user()
  • business_entities_banner_profile()
  • business_entities()
  • has_activity()

planning

  • budget_data(start_date, end_date)
  • joint_planning_data(start_date, end_date)

goals

  • savings_goals()
  • savings_goals_with_this_month_balances()
  • savings_goal_account(account_id)
  • dashboard_card()
  • legacy_migration()

recurring

  • streams(include_liabilities=None)
  • aggregated_items(start_date, end_date, filters=None)
  • dashboard_upcoming_items(start_date, end_date, include_liabilities=None, filters=None)
  • paused_banner()

investments

  • accounts()
  • dashboard_card()
  • portfolio(portfolio_input=None)
  • securities_historical_performance(input_data)

transactions

  • list(offset=None, limit=25, filters=None, order_by="date")
  • get(transaction_id, redirect_posted=True)
  • filters(search=None, include_ids=None)
  • filters_metadata(filters)
  • create(input_data)
  • update(input_data)
  • delete(transaction_id)
  • set_tags(transaction_id, tag_ids)
  • tags(search=None, limit=None, bulk_params=None, include_transaction_count=False)
  • categories(include_system_disabled_categories=None)

merchants

  • search(search=None, limit=20, include_ids=None)
  • household(offset=0, limit=50, order_by="TRANSACTION_COUNT", search=None)
  • recommended_for_transaction(transaction_id)
  • update(input_data)

attachments

  • get_upload_info(transaction_id)
  • add(input_data)
  • get(attachment_id)
  • delete(attachment_id)

rules

  • list()
  • create(input_data)
  • update(input_data)
  • delete(rule_id)
  • preview(rule, offset=None)
  • update_order(rule_id, order)
  • delete_all()

reports

  • cash_flow_dashboard(filters=None)
  • cash_flow_entity_aggregates(filters=None)
  • cash_flow_timeframe_aggregates(filters=None)
  • data(filters, group_by=None, group_by_timeframe=None, sort_by=None, include_category=False, include_category_group=False, include_merchant=False, include_business_entity=False, include_budget_variability=False, fill_empty_values=True)

retail_sync

  • get_settings()
  • get(sync_id)
  • list(filters, offset=0, limit=50, include_total_count=True)
  • create(input_data)
  • create_bulk(input_data)
  • start(sync_id)
  • complete(sync_id)
  • delete(sync_id)
  • match_transaction(retail_transaction_id, transaction_id)
  • unmatch_transaction(retail_transaction_id)
  • update_order(input_data)
  • update_vendor_settings(input_data)

Layout

  • src/monarch_api/: client code
  • tests/: mocked verification for request shapes and client behavior

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monarch_api-0.1.1.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monarch_api-0.1.1-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file monarch_api-0.1.1.tar.gz.

File metadata

  • Download URL: monarch_api-0.1.1.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for monarch_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86970a791776125595818c667ca5dd912a46480e217bc198be3398a497379f4f
MD5 504dbd1d30261908f66556912310ddf2
BLAKE2b-256 f1c96e732de31f8f027c9f83bea84111ab12f39613b9a19df8bd025b3931f76c

See more details on using hashes here.

Provenance

The following attestation bundles were made for monarch_api-0.1.1.tar.gz:

Publisher: publish-pypi.yml on erikrubstein/monarch-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monarch_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: monarch_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for monarch_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2e1addef72b7cc7fe37f63fd38ad3ff962ff80da19625df7d4e735b894f75d4
MD5 858f4199179a138695d6d55f977b331b
BLAKE2b-256 b238b46124bef9ae78565330768742dd98fc5c42d802fec99db0b1a044960036

See more details on using hashes here.

Provenance

The following attestation bundles were made for monarch_api-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on erikrubstein/monarch-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page