Skip to main content
Glama

get_wallet_balance

Retrieve wallet balance for specified account type and coin on Bybit exchange, enabling precise tracking of cryptocurrency holdings and financial management.

Instructions

Get wallet balance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountTypeYesAccount type (UNIFIED, CONTRACT, SPOT)
coinNoCoin symbol

Implementation Reference

  • MCP tool request handler that extracts arguments, calls the Bybit service method, and formats the response as MCP content.
    case 'get_wallet_balance': { const result = await this.bybitService.getWalletBalance(typedArgs.accountType, typedArgs.coin); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Input schema defining parameters for the get_wallet_balance tool: accountType (required) and optional coin.
    inputSchema: { type: 'object', properties: { accountType: { type: 'string', description: 'Account type (UNIFIED, CONTRACT, SPOT)', }, coin: { type: 'string', description: 'Coin symbol', }, }, required: ['accountType'], },
  • src/index.ts:139-156 (registration)
    Tool registration object added to the MCP server's tools list, including name, description, and input schema.
    { name: 'get_wallet_balance', description: 'Get wallet balance', inputSchema: { type: 'object', properties: { accountType: { type: 'string', description: 'Account type (UNIFIED, CONTRACT, SPOT)', }, coin: { type: 'string', description: 'Coin symbol', }, }, required: ['accountType'], }, },
  • Helper method in BybitService that constructs the API request parameters and calls the Bybit V5 wallet-balance endpoint to fetch the balance data.
    async getWalletBalance(accountType: string, coin?: string): Promise<BybitResponse<{ list: WalletBalance[] }> | { error: string }> { const params: any = { accountType }; if (coin) params.coin = coin; return this.makeBybitRequest('/v5/account/wallet-balance', 'GET', params); }

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/kondisettyravi/mcp-bybit-node'

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