360 Secure SkillHub
360 安全技能中心

Monarch Money

封装 Monarch Money 的 Python 库与命令行脚本:先交互式登录并保存本地会话,再按日期或月份查询账户余额、交易、预算和现金流,输出 JSON,并支持触发已绑定账户同步。依赖 python3 与 monarchmoney 库,需联网访问 Monarch Money。

silentknight87
silentknight87
热度 33.56
最近更新 2026-05-11 17:38:19
分类:生活依赖:代码执行 / 第三方 API / 读写文件应用场景:个人理财 / 财务 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add monarch
Metadata
name
monarch
description
Access Monarch Money financial data: accounts, transactions, budgets, and cashflow. Use when the user asks about their finances, spending, account balances, budget status, cashflow summaries, or wants to refresh linked bank accounts. Triggers on: 'how much did I spend', 'what's my balance', 'show my budget', 'cashflow this month', 'refresh my accounts', or any personal finance query.
metadata
{"openclaw":{"emoji":"💰","requires":{"bins":["python3"]},"install":[{"id":"pip","kind":"pip","package":"monarchmoney","label":"Install monarchmoney Python library"}]}}

Monarch Money Skill

Query Monarch Money for financial data via CLI wrapper scripts.

Prerequisites

  1. Install the library:

    pip install monarchmoney
    
  2. First-time authentication (interactive, run once):

    python3 scripts/login_setup.py
    

    Prompts for email, password, and MFA code if enabled. Saves session to ~/.monarchmoney/mm_session.pickle. Sessions last months.

Commands

All commands output JSON. Pipe through jq for filtering.

Accounts

python3 scripts/monarch.py accounts

Returns: id, displayName, type, subtype, currentBalance, institution, isHidden, includeInNetWorth.

Transactions

# Last 30 days (default)
python3 scripts/monarch.py transactions

# Custom date range
python3 scripts/monarch.py transactions --start 2026-01-01 --end 2026-01-31

# Limit results
python3 scripts/monarch.py transactions --limit 50

Returns: id, date, amount, merchant, category, account, notes, isPending, isRecurring.

Budgets

python3 scripts/monarch.py budgets

Returns: monthlyBudget, totalSpent, per-category breakdown (budgetAmount, spentAmount, remainingAmount).

Cashflow

# Current month
python3 scripts/monarch.py cashflow

# Specific month
python3 scripts/monarch.py cashflow --month 2026-01

Returns: income, expenses, savings, savingsRate for the specified month.

Refresh Accounts

python3 scripts/monarch.py refresh

Triggers a sync with all linked financial institutions.

Troubleshooting

  • "Not authenticated" or "Session expired": Delete ~/.monarchmoney/mm_session.pickle and re-run scripts/login_setup.py.
  • Rate limiting: Monarch Money may throttle rapid requests. Space out queries.
  • Import errors: Ensure monarchmoney is installed in the Python environment being used.