Skip to main content
Glama
paperinvest

Paper MCP Server

by paperinvest

cancel_order

Cancels an existing order by specifying the order ID, enabling management of trades through the Paper MCP Server's AI-driven trading platform. Simplifies order cancellation for streamlined trade control.

Instructions

Cancel an existing order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesOrder ID to cancel

Implementation Reference

  • Handler for the cancel_order tool. Makes a PUT request to the `/orders/{orderId}/cancel` endpoint using the configured axios instance to cancel the specified order.
    case 'cancel_order': response = await api.put(`/orders/${args.orderId}/cancel`); break;
  • Input schema definition for the cancel_order tool, specifying that an orderId string is required.
    name: 'cancel_order', description: 'Cancel an existing order', inputSchema: { type: 'object', properties: { orderId: { type: 'string', description: 'Order ID to cancel' } }, required: ['orderId'] } },
  • src/index.ts:388-392 (registration)
    Registration of all tools, including cancel_order, via the ListToolsRequestSchema handler which returns the tools array containing the cancel_order tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });

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/paperinvest/mcp-server'

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