Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

bitcoin_hd_wallet_balances

Fetch Bitcoin HD wallet balances and transaction summaries using an xpub key. Convert balances to various currencies and view detailed balance data for all derived addresses.

Instructions

Fetch balances for each active child address derived from a Bitcoin HD wallet. This tool provides detailed balance data for Bitcoin wallets identified by an xpub key. Required: walletAddress - The xpub key of the HD wallet. Optional: quoteCurrency - The currency for price conversion (USD, EUR, etc). Returns complete balance details including total balance, available balance, and transaction history summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletAddressYesThe xpub key of the Bitcoin HD wallet to get balances for. Must be a valid extended public key.
quoteCurrencyNoCurrency to quote Bitcoin values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.

Implementation Reference

  • Registration and implementation of the "bitcoin_hd_wallet_balances" tool.
    server.tool(
        "bitcoin_hd_wallet_balances",
        "Fetch balances for each active child address derived from a Bitcoin HD wallet.\n" +
            "This tool provides detailed balance data for Bitcoin wallets identified by an xpub key.\n" +
            "Required: walletAddress - The xpub key of the HD wallet.\n" +
            "Optional: quoteCurrency - The currency for price conversion (USD, EUR, etc).\n" +
            "Returns complete balance details including total balance, available balance, and transaction history summary.",
        {
            walletAddress: z
                .string()
                .describe(
                    "The xpub key of the Bitcoin HD wallet to get balances for. Must be a valid extended public key."
                ),
            quoteCurrency: z
                .enum(Object.values(validQuoteValues) as [string, ...string[]])
                .optional()
                .describe(
                    "Currency to quote Bitcoin values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
                ),
        },
        async (params) => {
            try {
                const response =
                    await goldRushClient.BitcoinService.getBitcoinHdWalletBalances(
                        params.walletAddress,
                        {
                            quoteCurrency: params.quoteCurrency as Quote,
                        }
                    );
                return {
                    content: [
                        {
                            type: "text",
                            text: stringifyWithBigInt(response.data),
                        },
                    ],
                };
            } catch (error) {
                return {
                    content: [{ type: "text", text: `Error: ${error}` }],
                    isError: true,
                };
            }
        }
    );

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/covalenthq/goldrush-mcp-server'

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