Skip to main content
Glama

fetchDeposits

Retrieve deposit history for a configured cryptocurrency account, filtering by currency code, timestamp, and limit. Supports access to over 100 exchanges via the CCXT MCP Server.

Instructions

Fetch deposit history for a configured account

Input Schema

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

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "accountName": { "description": "Account name defined in the configuration file (e.g., 'bybit_main')", "type": "string" }, "code": { "description": "Currency code (e.g., 'BTC', 'ETH')", "type": "string" }, "limit": { "description": "Limit the number of deposits returned (optional)", "type": "number" }, "since": { "description": "Timestamp in ms to fetch deposits since (optional)", "type": "number" } }, "required": [ "accountName" ], "type": "object" }

Implementation Reference

  • The handler function that executes the fetchDeposits tool logic: checks if the exchange supports fetchDeposits, calls it with parameters, and returns the 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 schema for input validation of the fetchDeposits tool parameters: accountName (required string), 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)"), },
  • Direct registration of the fetchDeposits tool on the MCP server using server.tool(), specifying 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)
    Higher-level registration call to registerAccountTools(server, ccxtServer) in CcxtMcpServer's registerTools method, which includes the fetchDeposits tool.
    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