Skip to main content
Glama

fetchDeposits

Retrieve deposit history for cryptocurrency exchange accounts to track incoming funds, filter by currency and time period, and monitor account activity.

Instructions

Fetch deposit history for a configured account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNameYesAccount name defined in the configuration file (e.g., 'bybit_main')
codeNoCurrency code (e.g., 'BTC', 'ETH')
sinceNoTimestamp in ms to fetch deposits since (optional)
limitNoLimit the number of deposits returned (optional)

Implementation Reference

  • The main execution logic for the fetchDeposits tool. Retrieves the CCXT exchange instance and calls fetchDeposits if supported, returning JSON formatted deposits or error.
    async ({ accountName, code, since, limit }) => { try { const exchange = ccxtServer.getExchangeInstance(accountName); // getExchangeInstance가 성공하면 인증은 보장됨 // fetchDeposits 메서드가 지원되는지 확인 if (!exchange.has["fetchDeposits"]) { return { content: [ { type: "text", text: `Account '${accountName}' (Exchange: ${exchange.id}) does not support fetching deposits`, }, ], isError: true, }; } const deposits = await exchange.fetchDeposits(code, since, limit); return { content: [ { type: "text", text: JSON.stringify(deposits, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error fetching deposits for account '${accountName}': ${ (error as Error).message }`, }, ], isError: true, }; } }
  • Zod input schema defining parameters for the fetchDeposits tool: accountName (required), code, since, limit (optional).
    accountName: z .string() .describe( "Account name defined in the configuration file (e.g., 'bybit_main')" ), code: z .string() .optional() .describe("Currency code (e.g., 'BTC', 'ETH')"), since: z .number() .optional() .describe("Timestamp in ms to fetch deposits since (optional)"), limit: z .number() .optional() .describe("Limit the number of deposits returned (optional)"), },
  • Registers the fetchDeposits tool on the MCP server using server.tool(), providing name, description, input schema, and handler function.
    server.tool( "fetchDeposits", "Fetch deposit history for a configured account", { accountName: z .string() .describe( "Account name defined in the configuration file (e.g., 'bybit_main')" ), code: z .string() .optional() .describe("Currency code (e.g., 'BTC', 'ETH')"), since: z .number() .optional() .describe("Timestamp in ms to fetch deposits since (optional)"), limit: z .number() .optional() .describe("Limit the number of deposits returned (optional)"), }, async ({ accountName, code, since, limit }) => { try { const exchange = ccxtServer.getExchangeInstance(accountName); // getExchangeInstance가 성공하면 인증은 보장됨 // fetchDeposits 메서드가 지원되는지 확인 if (!exchange.has["fetchDeposits"]) { return { content: [ { type: "text", text: `Account '${accountName}' (Exchange: ${exchange.id}) does not support fetching deposits`, }, ], isError: true, }; } const deposits = await exchange.fetchDeposits(code, since, limit); return { content: [ { type: "text", text: JSON.stringify(deposits, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error fetching deposits for account '${accountName}': ${ (error as Error).message }`, }, ], isError: true, }; } } );
  • src/server.ts:374-374 (registration)
    Top-level call to registerAccountTools in the CcxtMcpServer constructor or method, which in turn registers the fetchDeposits tool among others.
    registerAccountTools(this.server, this);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lazy-dinosaur/ccxt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server