Skip to main content
Glama

get_balance

Retrieve cryptocurrency account balances from the Bithumb exchange. Check holdings for specific coins or view all assets in your portfolio.

Instructions

Get account balance (Private)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinCodeNoCryptocurrency symbol (e.g. BTC, ETH) or ALLALL

Implementation Reference

  • Core handler function that implements the logic for retrieving account balance by calling Bithumb's 'balance' endpoint and refining the response.
    public async postBalance(coinCode = 'BTC'): Promise<IPostBalance> { const params = { currency: coinCode, }; const res = <IBalanceResponse>await this.requestInfo('balance', params); const data = this.refineBalance(res, coinCode.toLowerCase()); return data; }
  • Supporting utility that refines and standardizes the raw balance response for the specific coin.
    private refineBalance(res: IBalanceResponse, coinCode: string) { const data: IPostBalance = { ...res, data: { total_coin: res.data[`total_${coinCode}`], total_krw: res.data.total_krw, in_use_coin: res.data[`in_use_${coinCode}`], in_use_krw: res.data.in_use_krw, available_coin: res.data[`available_${coinCode}`], available_krw: res.data.available_krw, xcoin_last_coin: res.data[`xcoin_last_${coinCode}`], }, }; return data; }
  • src/index.ts:136-145 (registration)
    Tool registration entry in the MCP tools list, including name, description, and input schema.
    { name: 'get_balance', // Renamed from postBalance for clarity, as it retrieves data description: 'Get account balance (Private)', inputSchema: { type: 'object', properties: { coinCode: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH) or ALL', default: 'ALL' } } } },
  • MCP CallTool request handler switch case that dispatches get_balance calls to the postBalance method.
    case 'get_balance': result = await this.bithumbApi.postBalance(args.coinCode as string || 'ALL'); break;
  • JSON schema defining the input parameters for the get_balance tool.
    inputSchema: { type: 'object', properties: { coinCode: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH) or ALL', default: 'ALL' } } }

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/zereight/bithumb-mcp'

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