add_balance
Add a single asset or liability entry to a balance sheet period. Use predefined categories and optional currency conversion for non-USD amounts.
Instructions
Upsert a single balance sheet entry for a period (also edits — same composite key overwrites). Use this when recording just one or two balance items; prefer add_monthly for full month-end settlement. sub_type: cash|investment|other (assets) or short_term|long_term (liabilities). VALID BALANCE CATEGORIES — assets: cash, savings, housing_sub, usd_cash, cash_other, domestic_stock, overseas_stock, real_estate, pension, vehicle, deposit, asset_other. Liabilities: credit_card, short_term_other, loan, long_term_other. Use ONLY these category strings — do NOT invent your own. For non-USD users: pass currency as the native currency (e.g. "KRW") and amount in that currency — converted to USD via historical FX at date. Use category="usd_cash" (currency="USD") for USD-denominated assets held alongside home-currency ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | YYYY-MM | |
| date | Yes | YYYY-MM-DD (typically month-end) | |
| type | Yes | ||
| sub_type | Yes | cash | investment | other | short_term | long_term | |
| category | Yes | Must be one of the predefined balance categories: assets: cash, savings, housing_sub, usd_cash, cash_other, domestic_stock, overseas_stock, real_estate, pension, vehicle, deposit, asset_other. Liabilities: credit_card, short_term_other, loan, long_term_other. | |
| amount | Yes | Amount in `currency` units (whole units, no decimals) | |
| currency | No | Currency of `amount` (USD/KRW/JPY/EUR/CNY/GBP). Defaults to USD. Non-USD values are converted to USD via historical FX at `date` for storage. | USD |
| memo | No |