GET_ACCOUNTS
Retrieve Upbit account balances using private API integration to monitor and manage cryptocurrency holdings directly within the MCP server.
Instructions
Get Upbit account balances (requires private API enabled)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/get-accounts.ts:10-19 (handler)The execute function of the GET_ACCOUNTS tool. Ensures private API access, constructs HTTP client, signs JWT token, fetches accounts from Upbit API, and returns formatted JSON.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 schema defining empty input parameters for the GET_ACCOUNTS tool (no arguments required).parameters: z.object({}),
- src/index.ts:34-34 (registration)Registers the getAccountsTool (named GET_ACCOUNTS) with the FastMCP server.server.addTool(getAccountsTool);