jupiter_limit_order_cancel
Cancel one or more open limit orders on Jupiter by specifying the maker wallet and order public keys. Manage your DeFi orders directly on Solana.
Instructions
Cancel one or more open limit orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maker | Yes | Wallet that created the orders | |
| orders | Yes | Order public keys to cancel |
Implementation Reference
- src/tools/trigger.ts:35-46 (handler)Tool handler for jupiter_limit_order_cancel. Accepts maker wallet and array of order public keys, calls client.triggerCancel (POST /trigger/v2/orders/cancel), and returns JSON result.
register( "jupiter_limit_order_cancel", "Cancel one or more open limit orders.", { maker: z.string().describe("Wallet that created the orders"), orders: z.array(z.string()).describe("Order public keys to cancel"), }, async (args) => { const result = await client.triggerCancel(args); return JSON.stringify(result, null, 2); }, ); - src/tools/trigger.ts:38-41 (schema)Zod schema defining the input parameters: maker (string) and orders (array of strings).
{ maker: z.string().describe("Wallet that created the orders"), orders: z.array(z.string()).describe("Order public keys to cancel"), }, - src/index.ts:46-57 (registration)Generic MCP registration via McpServer.tool(), invoked by the register function. The tool name 'jupiter_limit_order_cancel' is passed to this from trigger.ts via registerTriggerTools.
server.tool(name, description, shape, async (args) => { try { const text = await handler(args); return { content: [{ type: "text" as const, text }] }; } catch (err: any) { return { content: [{ type: "text" as const, text: `Error: ${err.message}` }], isError: true, }; } }); toolCount++; - src/client.ts:164-169 (helper)JupiterClient.triggerCancel — makes a POST request to /trigger/v2/orders/cancel with the maker and orders array to cancel limit orders.
async triggerCancel(params: { maker: string; orders: string[] }) { return this.request("/trigger/v2/orders/cancel", { method: "POST", body: params, }); }