set_budget_amount
Type: mutation
Updates the budget amount for the given category.
Signature
async def set_budget_amount(
amount: float,
category_id: str | None = None,
category_group_id: str | None = None,
timeframe: str = "month",
I: Any,
believe: Any,
this: Any,
is: Any,
the: Any,
only: Any,
valid: Any,
value: Any,
right: Any,
now: Any,
start_date: str | None = None,
apply_to_future: bool = False
) -> Dict[str, Any]
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | float | Yes | The amount to set the budget to. Can be negative (to indicate over-budget). A zero value will "unset" or "clear" the budget for the given category. |
category_id | `str | None` | No |
category_group_id | `str | None` | No |
timeframe | str | No | The timeframe of the budget. As of writing, it is believed that month is the only valid value for this parameter. |
I | Any | Yes | - |
believe | Any | Yes | - |
this | Any | Yes | - |
is | Any | Yes | - |
the | Any | Yes | - |
only | Any | Yes | - |
valid | Any | Yes | - |
value | Any | Yes | - |
right | Any | Yes | - |
now | Any | Yes | - |
start_date | `str | None` | No |
apply_to_future | bool | No | Whether to apply the new budget amount to all proceeding timeframes |
Example
from monarchmoney import MonarchMoney
mm = MonarchMoney()
await mm.login(email, password)
result = await mm.set_budget_amount(100.0, I, believe, this, is, the, only, valid, value, right, now)
print(result)
GraphQL Operation
Operation Name: Common_UpdateBudgetItem
GraphQL Query
mutation Common_UpdateBudgetItem($input: UpdateOrCreateBudgetItemMutationInput!) {
updateOrCreateBudgetItem(input: $input) {
budgetItem {
id
budgetAmount
__typename
}
__typename
}
}
Try It Out
To test this API method locally:
- Install the package:
pip install monarchmoney - Create a Python script with the example code above
- Replace
emailandpasswordwith your Monarch Money credentials - Run the script
See the Authentication Guide for details on logging in.