get_category_balances
Qué hace
Sección titulada «Qué hace»Budgeted, spent (activity) and available (balance) per category for a month.
Use it for “how much is left in Groceries?” or to list every category’s money. Amounts in currency units; activity is negative for spending. Hidden and internal categories are left out, and so are categories with nothing budgeted, spent or available unless include_empty is true. For the share of each budget consumed use get_budget_vs_actual; for the month’s totals, get_monthly_summary. One YNAB request; changes nothing.
Comportamiento
Sección titulada «Comportamiento»| Tipo | solo lectura |
| Confirmación | no |
| Deshacer | no |
| Idempotente | sí |
| Peticiones a YNAB | 1 para el ejemplo de abajo, con la caché vacía |
Parámetros
Sección titulada «Parámetros»| Nombre | Tipo | Obligatorio | Por defecto | Descripción |
|---|---|---|---|---|
plan_id |
string | sí | — | YNAB plan id or ‘last-used’. |
month |
string | no | "current" |
‘YYYY-MM-01’ or ‘current’. |
include_empty |
boolean | no | false |
Also list categories with no amount at all. |
Devuelve
Sección titulada «Devuelve»array of object
| Campo | Tipo | Descripción |
|---|---|---|
category_id |
string | YNAB id of the category. |
name |
string | Category name. |
group |
string | Name of the category’s group. |
budgeted |
number | Amount assigned to the category this month. |
activity |
number | Amount spent (negative) or received in the category this month. |
balance |
number | Available at the end of the month: carried over, plus budgeted, plus activity. |
Ejemplo
Sección titulada «Ejemplo»Argumentos:
{ "plan_id": "demo-budget", "month": "2026-09-01"}Respuesta sobre el presupuesto de demostración:
[ { "category_id": "cat-rent", "name": "Alquiler", "group": "Facturas", "budgeted": 950.0, "activity": -950.0, "balance": 0.0 }, { "category_id": "cat-power", "name": "Luz", "group": "Facturas", "budgeted": 64.2, "activity": -64.2, "balance": 0.0 }, { "category_id": "cat-internet", "name": "Fibra", "group": "Facturas", "budgeted": 29.99, "activity": -29.99, "balance": 0.0 }, { "category_id": "cat-phone", "name": "Teléfono", "group": "Facturas", "budgeted": 19.99, "activity": -19.99, "balance": 0.0 }, "… 6 more"]Errores
Sección titulada «Errores»month must be 'current' or the first day of a month as YYYY-MM-01, got '{month}'.
Los errores propios de YNAB llegan como Error calling tool '<tool>': YNAB <status>: <detail>.
Ver también
Sección titulada «Ver también»Proyecto no oficial. «We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. The official YNAB website can be found at https://www.ynab.com. The names YNAB and You Need A Budget, as well as related names, tradenames, marks, trademarks, emblems, and images are registered trademarks of YNAB.» No estamos afiliados, asociados ni conectados oficialmente de ninguna manera con YNAB ni con sus filiales o empresas afiliadas. El sitio web oficial de YNAB se encuentra en https://www.ynab.com. Los nombres YNAB y You Need A Budget, así como los nombres, nombres comerciales, marcas, emblemas e imágenes relacionados, son marcas registradas de YNAB. avenir-mcp se ofrece tal cual, sin garantía, y no es asesoramiento financiero. Aviso legal · Privacidad