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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states it fetches history without detailing behavioral traits like authentication requirements, rate limits, pagination, error handling, or response format. This leaves significant gaps for an agent to understand how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part of it contributes directly to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (fetching financial data with 4 parameters), lack of annotations, and no output schema, the description is insufficient. It doesn't cover critical aspects like response structure, error cases, or operational constraints, leaving the agent under-informed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description implies parameters like 'accountName' and possibly filtering by currency or time, but doesn't add meaning beyond the input schema, which has 100% coverage with detailed descriptions for all parameters. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetch') and resource ('deposit history for a configured account'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'fetchWithdrawals' or 'fetchBalance' beyond the resource name, which keeps it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'fetchWithdrawals' or 'fetchBalance', nor does it mention prerequisites such as needing a configured account. It simply states what it does without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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