trade_get_portfolio
Retrieve a snapshot of your portfolio: holdings, cash, equity, and unrealized profit/loss. Supports markdown or JSON output.
Instructions
Get the current portfolio: holdings, cash, equity, and unrealized P&L.
Read-only snapshot of all open positions with per-position and aggregate profit/loss.
Args: params (PortfolioInput): Validated input containing: - response_format (ResponseFormat): "markdown" (default) or "json"
Returns: str: Markdown summary, or JSON with this schema: { "as_of": str, # ISO 8601 UTC timestamp "cash_balance": float, "invested": float, "market_value": float, "total_equity": float, "unrealized_pnl": float, "position_count": int, "positions": [ { "symbol": str, "quantity": int, "avg_cost": float, "last_price": float, "invested": float, "market_value": float, "unrealized_pnl": float, "unrealized_pnl_pct": float } ] } On failure: "Error: "
Examples: - "How is my portfolio doing?" -> default markdown - "Give me my positions as JSON" -> response_format="json"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |