Browse docs

Account revaluation

Some accounts change value without a cash transaction — a brokerage or retirement account moves with the market, a home or vehicle is re-appraised, a private investment is re-marked. Revaluation records that change.

Two different things move these accounts, handled differently:

  • Cash flows in/out — contributions, withdrawals, buying/selling, transfers. These are ordinary journal entries between two accounts. Use them, not revaluation.
  • Valuation changes — the market moved. There's no counterparty account, so the system books a balancing entry to an unrealized gain/loss account.

You give the account's current value; the engine reads its book balance as of your date and posts only the delta — the same "balance adjustment" pattern personal-finance tools use. Re-sending a value that already matches is a no-op.

Revalue an account

POST /accounts/{accountId}/revalue (MCP tool: revalue_account). Only asset and liability accounts can be revalued. target_value is the everyday value in its natural sign (a brokerage worth $52,300 is 52300).

bash
curl -X POST "$FLYWHEEL_API/accounts/$ACCOUNT_ID/revalue" \
-H "Authorization: Bearer $FLYWHEEL_KEY" \
-H "Content-Type: application/json" \
-d '{
  "target_value": 52300.00,
  "as_of_date": "2026-06-30"
}'
{
  "data": {
    "entry_id": "je_…",
    "status": "posted",
    "book_value": 50000.00,
    "target_value": 52300.00,
    "delta": 2300.00,
    "direction": "gain"
  },
  "error": null
}

Optional fields: memo, post: false (leave a reviewable draft), and gain_account_id / loss_account_id to override the default unrealized accounts.

How the entry is booked

AccountValue changeEntry
Assetup (gain)DR asset / CR 4560 Investment Gains (Unrealized)
Assetdown (loss)DR 7600 Investment Losses (Unrealized) / CR asset
Liabilityup — owe more (loss)DR loss / CR liability
Liabilitydown — owe less (gain)DR liability / CR gain

The unrealized accounts are non-operating: a revaluation moves net worth and shows on the income statement as a gain/loss, but its offset nets out of the cash-flow statement — it never appears as cash in or out.

The 4560 / 7600 accounts are seeded in personal-mode orgs. If your org doesn't have them, create them or pass explicit gain_account_id / loss_account_id — otherwise the call returns MISSING_REVALUATION_ACCOUNT.

Errors

  • 404 ACCOUNT_NOT_FOUND — no such account in this org.
  • 422 INVALID_ACCOUNT_TYPE — only asset/liability accounts can be revalued.
  • 422 INACTIVE_ACCOUNT — the account is archived.
  • 422 MISSING_REVALUATION_ACCOUNT — no active 4560/7600; create them or pass account ids.
  • 422 PERIOD_CLOSED — the date is in a closed period; reopen it first.