get_portfolio
Retrieve current portfolio holdings including positions, quantities, prices, and profit/loss data from Trading 212 investment accounts.
Instructions
List all open positions in the portfolio with current prices, quantities, and profit/loss
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:579-589 (handler)The handler logic for the 'get_portfolio' tool, which calls the client's getPositions method and returns the result as formatted JSON.
case 'get_portfolio': { const portfolio = await client.getPositions(); return { content: [ { type: 'text', text: JSON.stringify(portfolio, null, 2), }, ], }; } - src/index.ts:91-100 (registration)Registration of the 'get_portfolio' tool, including its name, description, and empty input schema.
// Portfolio/Positions Tools { name: 'get_portfolio', description: 'List all open positions in the portfolio with current prices, quantities, and profit/loss', inputSchema: { type: 'object', properties: {}, }, },