CREATE_WITHDRAWAL
Withdraw digital assets from your Upbit exchange account by specifying currency, amount, destination address, and network type using the private API.
Instructions
Request a digital asset withdrawal (requires private API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | Yes | ||
| amount | Yes | ||
| address | Yes | ||
| net_type | Yes | ||
| secondary_address | No | ||
| transaction_type | No |
Implementation Reference
- src/tools/create-withdrawal.ts:19-35 (handler)The complete implementation of the CREATE_WITHDRAWAL tool, including name, description, parameters schema reference, and the execute handler that performs the withdrawal via Upbit's private API.export const createWithdrawalTool = { name: "CREATE_WITHDRAWAL", description: "Request a digital asset withdrawal (requires private API)", parameters: paramsSchema, execute: async (params: Params) => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const token = signJwtToken(params); const data = await fetchJson<unknown>(client, "/withdraws/coin", { method: "POST", data: params, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); }, } as const;
- src/tools/create-withdrawal.ts:6-15 (schema)Zod schema defining the input parameters for the CREATE_WITHDRAWAL tool.const paramsSchema = z .object({ currency: z.string(), amount: z.string(), address: z.string(), net_type: z.string(), secondary_address: z.string().optional(), transaction_type: z.enum(["default", "internal"]).optional(), }) .strict();
- src/index.ts:40-40 (registration)Registration of the CREATE_WITHDRAWAL tool with the FastMCP server.server.addTool(createWithdrawalTool);
- src/index.ts:7-7 (registration)Import statement for the CREATE_WITHDRAWAL tool implementation.import { createWithdrawalTool } from "./tools/create-withdrawal.js";