GET_ORDER
Retrieve details of a specific order on the Upbit cryptocurrency exchange using the private API. Requires order UUID or identifier to fetch accurate order information.
Instructions
Get a single Upbit order (requires private API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | No | ||
| uuid | No |
Implementation Reference
- src/tools/get-order.ts:21-34 (handler)The execute function that performs the core logic: ensures private API access, constructs the Upbit API request for a specific order using uuid or identifier, signs JWT token, fetches the order data, and returns formatted JSON.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 validating input parameters: requires either 'uuid' or 'identifier' to identify the order.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 with the FastMCP server.server.addTool(getOrderTool);