CANCEL_ORDER
Cancel an existing order on the Upbit cryptocurrency exchange by providing the order UUID, utilizing private API access for secure transaction execution.
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 that cancels an Upbit order by sending a DELETE request to the /order endpoint with a signed JWT token.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-8 (schema)Zod schema defining the input parameter 'uuid' for the CANCEL_ORDER tool.const paramsSchema = z.object({ uuid: z.string().min(1), });
- src/index.ts:38-38 (registration)Registers the cancelOrderTool with the FastMCP server instance.server.addTool(cancelOrderTool);