LIST_WITHDRAWAL_ADDRESSES
List all withdrawal addresses registered on your Upbit account. Requires private API access.
Instructions
List registered withdrawal-allowed addresses (requires private API)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The execute function that calls the Upbit API /withdraws/coin_addresses endpoint to list withdrawal-allowed addresses. It ensures private API is enabled, signs a JWT token, and fetches the data.
export const listWithdrawalAddressesTool = { name: "LIST_WITHDRAWAL_ADDRESSES", description: "List registered withdrawal-allowed addresses (requires private API)", parameters: z.object({}), execute: async () => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const token = signJwtToken(); const data = await fetchJson<unknown>(client, "/withdraws/coin_addresses", { headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); }, } as const; - Empty Zod schema (z.object({})) — no parameters are required for this tool.
parameters: z.object({}), - src/index.ts:39-39 (registration)Registration of listWithdrawalAddressesTool with the FastMCP server via server.addTool().
server.addTool(listWithdrawalAddressesTool); - src/index.ts:20-20 (registration)Import of listWithdrawalAddressesTool from the tool implementation file.
import { listWithdrawalAddressesTool } from "./tools/list-withdrawal-addresses.js"; - src/lib/upbit-auth.ts:5-16 (helper)ensurePrivateEnabled() — validates that private API access is configured before the tool executes.
export function ensurePrivateEnabled(): void { if (!config.upbit.enablePrivate) { throw new Error( "Private trading tools are disabled. Set UPBIT_ENABLE_TRADING=true to enable.", ); } if (!config.upbit.accessKey || !config.upbit.secretKey) { throw new Error( "Upbit API keys are not configured. Set UPBIT_ACCESS_KEY and UPBIT_SECRET_KEY.", ); } }