GET_ORDER
Retrieve a specific order from the Upbit cryptocurrency exchange using its unique identifier or UUID. This tool accesses private API data to provide detailed order information for tracking and analysis.
Instructions
Get a single Upbit order (requires private API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | ||
| identifier | No |
Implementation Reference
- src/tools/get-order.ts:21-34 (handler)The execute function that implements the core logic of the GET_ORDER tool, authenticating and fetching a single order from the Upbit API using either UUID or identifier.execute: async ({ uuid, identifier }: Params) => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const query: Record<string, string> = {}; if (uuid) query.uuid = uuid; if (identifier) query.identifier = identifier; const token = signJwtToken(query); const data = await fetchJson<unknown>(client, "/order", { params: query, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); },
- src/tools/get-order.ts:6-13 (schema)Zod schema defining the input parameters for the GET_ORDER tool: optional uuid or identifier (at least one required).const paramsSchema = z .object({ uuid: z.string().optional(), identifier: z.string().optional(), }) .refine((v) => v.uuid || v.identifier, { message: "Either uuid or identifier is required", });
- src/index.ts:37-37 (registration)Registers the getOrderTool (named GET_ORDER) with the FastMCP server.server.addTool(getOrderTool);