Skip to main content
Glama
enderekici

Trading 212 MCP Server

by enderekici

place_stop_order

Execute a stop order that converts to a market order when a specified price threshold is reached, enabling automated trading decisions in Trading 212 accounts.

Instructions

Place a stop order that becomes a market order when the stop price is reached

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerYesThe ticker symbol of the instrument
quantityYesThe quantity to buy (positive) or sell (negative)
stopPriceYesThe stop price that triggers the market order
timeValidityNoTime validity of the orderDAY

Implementation Reference

  • The core client implementation for the place_stop_order tool, which sends a POST request to the /equity/orders/stop API endpoint.
    async placeStopOrder(order: StopOrderRequest): Promise<Order> {
      return this.request(
        '/equity/orders/stop',
        {
          method: 'POST',
          body: JSON.stringify(order),
        },
        OrderSchema,
      );
    }
  • src/index.ts:669-680 (registration)
    The registration of the place_stop_order tool handler within the MCP server's request handler switch statement.
    case 'place_stop_order': {
      const validated = StopOrderRequestSchema.parse(args);
      const order = await client.placeStopOrder(validated);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(order, null, 2),
          },
        ],
      };
    }

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