GET_ACCOUNTS
Retrieve your Upbit cryptocurrency exchange account balances and asset information. This tool requires private API access to securely fetch your portfolio data.
Instructions
Get Upbit account balances (requires private API enabled)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-accounts.ts:10-19 (handler)The execute function that implements the core logic of the GET_ACCOUNTS tool: authenticates via JWT, calls Upbit /accounts API, and returns formatted account balances.execute: async () => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const token = signJwtToken(); const data = await fetchJson<unknown>(client, "/accounts", { headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); },
- src/tools/get-accounts.ts:9-9 (schema)Zod input schema for the GET_ACCOUNTS tool, defining no required parameters.parameters: z.object({}),
- src/index.ts:34-34 (registration)Registers the getAccountsTool with the FastMCP server instance.server.addTool(getAccountsTool);