create_investment_transaction
Record a new investment transaction (buy, sell, dividend, fee, etc.) in a portfolio. The security must already exist in the portfolio as a holding — call search_securities to resolve a ticker to a securityId, then ensure a holding exists. quantity, price, and fees are decimal strings (e.g. "10.5", "150.00", "0.00").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | When the trade occurred. Accepts a date-only value (ISO 8601, e.g. "2024-03-15") or a full datetime (e.g. "2024-03-15T09:30:00.000Z"); date-only is stored at UTC midnight. | |
| fees | Yes | Transaction fees/commissions as a decimal string (e.g. "0.00") | |
| name | No | Optional label or note for this transaction | |
| price | Yes | Price per share/unit as a decimal string (e.g. "150.00") | |
| category | Yes | Transaction type: buy, sell, dividend, transfer, tax, fee, cancel, or other | |
| quantity | Yes | Number of shares/units as a decimal string (e.g. "10.5") | |
| securityId | Yes | Security ID — resolve via search_securities first | |
| portfolioId | Yes | Portfolio ID (from get_portfolios) |