Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

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
NameRequiredDescriptionDefault
tickerYesThe ticker symbol of the instrument (e.g., AAPL, TSLA)

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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));
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/enderekici/trading212-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server