Skip to main content

Activity Types Reference

This document provides a comprehensive reference for Activity types used in WealthVN. Understanding these types is essential for creating activities programmatically through the addon API.

Note: For complete addon development guidance, see the Addon Developer Guide and API Reference.

Activity Reference

TypeTypical Use CaseCash ImpactHoldings Impact
BUYPurchase of a security or other asset.Decreases cashIncreases quantity
SELLDisposal of a security or asset.Increases cashDecreases quantity
DIVIDENDCash dividend paid into the account.Increases cash
INTERESTInterest earned on cash or fixed-income positions.Increases cash
DEPOSITIncoming funds from outside WealthVN.Increases cash
WITHDRAWALOutgoing funds to an external account.Decreases cash
ADD_HOLDINGBring in a position without recording a trade (e.g. opening balance, gift received, option assignment).Fee onlyIncreases quantity
REMOVE_HOLDINGWrite-off, gift, or expire a position without recording a sale.Fee onlyDecreases quantity
TRANSFER_INMove cash or assets into this account from another WealthVN account (asset cost basis preserved).Increases cash or quantityIncreases quantity for assets
TRANSFER_OUTMove cash or assets out of this account (asset cost basis exported).Decreases cash or quantityDecreases quantity for assets
FEEStand-alone brokerage or platform fee not tied to a trade.Decreases cash
TAXTax paid from the account (e.g. dividend withholding, realised CGT).Decreases cash
SPLITStock split or reverse split. Adjusts units and per-share cost so total cost remains constant.Quantity and unit cost adjusted

Tip: Every cash leg automatically books to the synthetic symbol $CASH-<CCY> (for example $CASH-USD) so cash balances remain visible alongside securities.

Quick‑Start Cheat‑Sheet

Use this table as a guide for common workflows:

ScenarioRecommended ActivitiesWhy
Initial snapshotADD_HOLDING, DEPOSITFast way to seed starting positions and cash.
Routine tradingBUY, SELL (plus DIVIDEND, INTEREST)Full P/L and cash reconciliation.
Inter-account movesTRANSFER_IN, TRANSFER_OUTRetains cost basis; avoids phantom gains/losses.
One-off chargesFEE, TAXKeeps expense reporting explicit.
Gifts / write-offsADD_HOLDING, REMOVE_HOLDINGSidesteps cash when no sale proceeds exist.
Corporate actionSPLITNormalises quantity/cost without affecting value.

Required Form Fields

All activities require you to choose an account and date. The table below lists the additional mandatory inputs shown in the add-activity forms.

TypeRequired Fields
BUYSymbol, Quantity, Unit Price
SELLSymbol, Quantity, Unit Price
DIVIDENDSymbol, Amount
INTERESTAmount
DEPOSITAmount
WITHDRAWALAmount
TRANSFER_INAmount
TRANSFER_OUTAmount
ADD_HOLDINGSymbol, Quantity, Average Cost
REMOVE_HOLDINGSymbol, Quantity, Average Cost
FEEFee Amount
TAXAmount
SPLITSymbol, Split Ratio

Workflow Styles

Simple (Holdings-Only)

  • Use ADD_HOLDING / REMOVE_HOLDING to line up positions.
  • Adjust cash once with DEPOSIT / WITHDRAWAL.
  • Good for quick onboarding or backfilling missing history when only tracking portfolio value.

Full (Transaction-Level)

  1. Seed the account with a DEPOSIT.
  2. Record every BUY, SELL, DIVIDEND, INTEREST.
  3. Mirror transfers with TRANSFER_IN / TRANSFER_OUT.
  4. Log ad-hoc expenses via FEE and TAX.
  • Good for precise IRR, cash-flow and tax analytics.

Activities can be inserted retroactively; WealthVN recalculates balances automatically.