Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

get_orders

Retrieve all active orders including pending and processing orders from your Trading 212 investment account for portfolio tracking and management.

Instructions

Retrieve all active orders (pending, processing, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for 'get_orders' MCP tool in src/index.ts. Calls client.getOrders().
    case 'get_orders': {
      const orders = await client.getOrders();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(orders, null, 2),
          },
        ],
      };
    }
  • Implementation of getOrders() in client.ts. Fetches orders from the /equity/orders endpoint.
    async getOrders(): Promise<Order[]> {
      return this.request('/equity/orders', {}, z.array(OrderSchema));
    }
  • src/index.ts:117-124 (registration)
    Registration of 'get_orders' tool in the tool list in src/index.ts.
    {
      name: 'get_orders',
      description: 'Retrieve all active orders (pending, processing, etc.)',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },

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