CANCEL_ORDER
Cancel an existing cryptocurrency order on the Upbit exchange using the order's unique identifier to manage trading positions.
Instructions
Cancel an existing Upbit order (requires private API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes |
Implementation Reference
- src/tools/cancel-order.ts:16-28 (handler)The execute function of the CANCEL_ORDER tool, which cancels an Upbit order by sending a DELETE request to the /order endpoint with JWT authentication.execute: async ({ uuid }: Params) => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const query = { uuid }; const token = signJwtToken(query); const data = await fetchJson<unknown>(client, "/order", { method: "DELETE", params: query, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); },
- src/tools/cancel-order.ts:6-10 (schema)Zod schema defining the input parameters for the CANCEL_ORDER tool: uuid (required string).const paramsSchema = z.object({ uuid: z.string().min(1), }); type Params = z.infer<typeof paramsSchema>;
- src/index.ts:38-38 (registration)Registration of the cancelOrderTool with the FastMCP server instance.server.addTool(cancelOrderTool);