LIST_DEPOSITS
List deposit transactions with optional filtering by currency, state, and pagination using your private Upbit API.
Instructions
List deposits (requires private API)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "LIST_DEPOSITS"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | ||
| state | No | ||
| page | No | ||
| limit | No |
Implementation Reference
- src/tools/list-deposits.ts:17-38 (handler)Main tool handler: executes the LIST_DEPOSITS tool logic. Validates params via Zod schema, checks private API is enabled, builds query params, signs a JWT token for Upbit API auth, calls GET /deposits, and returns JSON-stringified response.
export const listDepositsTool = { name: "LIST_DEPOSITS", description: "List deposits (requires private API)", parameters: paramsSchema, execute: async ({ currency, state, page, limit }: Params) => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const query = { page, limit, currency, state, }; const token = signJwtToken(query); const data = await fetchJson<unknown>(client, "/deposits", { params: query, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); }, } as const; - src/tools/list-deposits.ts:6-13 (schema)Zod paramsSchema defining input validation for LIST_DEPOSITS: optional currency (string), optional state (string), page (int >=1, default 1), limit (int 1-100, default 50). Strict mode rejects unknown keys.
const paramsSchema = z .object({ currency: z.string().optional(), state: z.string().optional(), page: z.number().int().min(1).default(1), limit: z.number().int().min(1).max(100).default(50), }) .strict(); - src/index.ts:49-49 (registration)Registration via server.addTool(listDepositsTool) in the main FastMCP server setup.
server.addTool(listDepositsTool); - src/index.ts:19-19 (registration)Import statement for listDepositsTool from the list-deposits.ts module.
import { listDepositsTool } from "./tools/list-deposits.js"; - src/lib/upbit-auth.ts:5-16 (helper)Helper ensurePrivateEnabled() called by the handler to check that private API trading is enabled and API keys are configured before making the request.
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.", ); } }