Skip to main content
Glama

ig_delete_working_order

Remove a working order on IG Trading by specifying the deal ID. Execute deletions quickly to manage trading positions and orders effectively.

Instructions

Delete a working order

Input Schema

NameRequiredDescriptionDefault
dealIdYesDeal ID of the order to delete

Input Schema (JSON Schema)

{ "properties": { "dealId": { "description": "Deal ID of the order to delete", "type": "string" } }, "required": [ "dealId" ], "type": "object" }

Implementation Reference

  • Core implementation of deleteWorkingOrder method in IGService class, which performs the API DELETE request to remove the working order and fetches confirmation if available.
    async deleteWorkingOrder(dealId) { try { const response = await this.apiClient.delete(`/workingorders/otc/${dealId}`, {}, 1); if (response.data.dealReference) { const confirmation = await this.getConfirmation(response.data.dealReference); return { order: response.data, confirmation }; } return response.data; } catch (error) { logger.error(`Failed to delete working order ${dealId}:`, error.message); throw error; } }
  • Tool registration in the TOOLS array, including name, description, and input schema definition.
    { name: 'ig_delete_working_order', description: 'Delete a working order', inputSchema: { type: 'object', properties: { dealId: { type: 'string', description: 'Deal ID of the order to delete', }, }, required: ['dealId'], }, },
  • MCP server dispatch handler for the tool, which calls the IGService method and formats the response.
    case 'ig_delete_working_order': const deleteResult = await igService.deleteWorkingOrder(args.dealId); return { content: [ { type: 'text', text: JSON.stringify(deleteResult, null, 2), }, ], };
  • Input schema definition for the tool parameters.
    inputSchema: { type: 'object', properties: { dealId: { type: 'string', description: 'Deal ID of the order to delete', }, }, required: ['dealId'], }, },

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