Skip to main content
Glama

get_wallet_balance

Retrieve cryptocurrency wallet balances for Bybit trading accounts. Specify account type and optional coin to check available funds for trading operations.

Instructions

Get wallet balance

Input Schema

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

Implementation Reference

  • MCP tool handler case that invokes the BybitService.getWalletBalance method with provided arguments and formats the response as JSON text 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 definition for the get_wallet_balance tool, specifying accountType as required and coin as optional.
    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-155 (registration)
    Tool registration entry in the ListTools response, 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'], },
  • Core implementation of wallet balance retrieval using Bybit V5 API endpoint /v5/account/wallet-balance, constructing parameters and making authenticated GET request.
    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