GET_DEPOSIT_ADDRESS
Retrieve a deposit address for a specific cryptocurrency and network type to receive funds.
Instructions
Get a single deposit address for a currency and net_type (private)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | Yes | ||
| net_type | Yes |
Implementation Reference
- src/tools/get-deposit-address.ts:15-32 (handler)The execute function that makes an HTTP request to GET /deposits/coin_address with the currency and net_type parameters. It signs a JWT token for authentication and returns the deposit address data.
export const getDepositAddressTool = { name: "GET_DEPOSIT_ADDRESS", description: "Get a single deposit address for a currency and net_type (private)", parameters: paramsSchema, execute: async ({ currency, net_type }: Params) => { ensurePrivateEnabled(); const baseURL = `${config.upbit.baseUrl}${config.upbit.apiBasePath}`; const client = createHttpClient(baseURL); const query = { currency, net_type }; const token = signJwtToken(query); const data = await fetchJson<unknown>(client, "/deposits/coin_address", { params: query, headers: { Authorization: `Bearer ${token}` }, }); return JSON.stringify(data, null, 2); }, } as const; - Zod schema defining the input parameters: currency (string) and net_type (string), using .strict() to reject unknown fields.
const paramsSchema = z .object({ currency: z.string(), net_type: z.string(), }) .strict(); - src/index.ts:46-46 (registration)Registration of the tool with the FastMCP server via server.addTool(getDepositAddressTool) on line 46.
server.addTool(getDepositAddressTool); - src/index.ts:10-10 (registration)Import statement for the getDepositAddressTool from the tools module.
import { getDepositAddressTool } from "./tools/get-deposit-address.js";