Skip to main content
Glama

ig_get_positions

Retrieve all open trading positions from IG Trading MCP server for forex, indices, and commodities to monitor and manage active trades effectively.

Instructions

Get all open positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool schema definition with input schema (empty object as no parameters required) and description.
    name: 'ig_get_positions', description: 'Get all open positions', inputSchema: { type: 'object', properties: {}, }, },
  • MCP server tool handler that calls igService.getPositions() and returns JSON stringified response.
    case 'ig_get_positions': const positions = await igService.getPositions(); return { content: [ { type: 'text', text: JSON.stringify(positions, null, 2), }, ], };
  • Core implementation of get positions: makes authenticated API GET request to /positions endpoint and returns the data.
    async getPositions() { try { const response = await this.apiClient.get('/positions', 2); return response.data; } catch (error) { logger.error('Failed to get positions:', error.message); throw error; } }

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/kea0811/ig-trading-mcp'

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