get_position
Retrieve detailed information about a specific investment position using its ticker symbol to monitor holdings and track performance in your Trading 212 account.
Instructions
Get detailed information about a specific position by ticker symbol
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | Yes | The ticker symbol of the instrument (e.g., AAPL, TSLA) |
Implementation Reference
- src/index.ts:591-602 (handler)The MCP request handler for 'get_position', which parses the ticker argument and calls the client's getPositions method.
case 'get_position': { const { ticker } = TickerInputSchema.parse(args); const positions = await client.getPositions(ticker); return { content: [ { type: 'text', text: JSON.stringify(positions, null, 2), }, ], }; } - src/client.ts:147-150 (handler)The actual API implementation of getPositions in the Trading212Client.
async getPositions(ticker?: string): Promise<Position[]> { const qs = ticker ? `?ticker=${encodeURIComponent(ticker)}` : ''; return this.request(`/equity/positions${qs}`, {}, z.array(PositionSchema)); }