Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

historical_portfolio_value

Track daily portfolio value changes for a wallet address across tokens on a blockchain network. Analyze value trends over a specified timeframe with optional currency conversion.

Instructions

Commonly used to render a daily portfolio balance for an address broken down by the token. Required: chainName (blockchain network), walletAddress (wallet address). Optional: quoteCurrency for value conversion, days (timeframe to analyze, default 7). Returns portfolio value time series data showing value changes over the specified timeframe.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
walletAddressYesThe wallet address to get portfolio history for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.
quoteCurrencyNoCurrency to quote portfolio values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.
daysNoNumber of days of historical data to retrieve. Default is 7 days.

Implementation Reference

  • The handler for the historical_portfolio_value tool, which calls goldRushClient.BalanceService.getHistoricalPortfolioForWalletAddress.
    async (params) => {
        try {
            const response =
                await goldRushClient.BalanceService.getHistoricalPortfolioForWalletAddress(
                    params.chainName as Chain,
                    params.walletAddress,
                    {
                        quoteCurrency: params.quoteCurrency as Quote,
                        days: params.days,
                    }
                );
            return {
                content: [
                    {
                        type: "text",
                        text: stringifyWithBigInt(response.data),
                    },
                ],
            };
        } catch (error) {
            return {
                content: [{ type: "text", text: `Error: ${error}` }],
  • The Zod schema validation for the historical_portfolio_value tool parameters.
    {
        chainName: z
            .enum(Object.values(ChainName) as [string, ...string[]])
            .describe(
                "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
            ),
        walletAddress: z
            .string()
            .describe(
                "The wallet address to get portfolio history for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically."
            ),
        quoteCurrency: z
            .enum(Object.values(validQuoteValues) as [string, ...string[]])
            .optional()
            .describe(
                "Currency to quote portfolio values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
            ),
        days: z
            .number()
            .optional()
            .default(7)
            .describe(
                "Number of days of historical data to retrieve. Default is 7 days."
            ),
    },
  • The MCP tool registration for historical_portfolio_value.
    server.tool(
        "historical_portfolio_value",
        "Commonly used to render a daily portfolio balance for an address broken down by the token. " +
            "Required: chainName (blockchain network), walletAddress (wallet address). " +
            "Optional: quoteCurrency for value conversion, days (timeframe to analyze, default 7). " +
            "Returns portfolio value time series data showing value changes over the specified timeframe.",
        {
            chainName: z
                .enum(Object.values(ChainName) as [string, ...string[]])
                .describe(
                    "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
                ),
            walletAddress: z
                .string()
                .describe(
                    "The wallet address to get portfolio history for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically."
                ),
            quoteCurrency: z
                .enum(Object.values(validQuoteValues) as [string, ...string[]])
                .optional()
                .describe(
                    "Currency to quote portfolio values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
                ),
            days: z
                .number()
                .optional()
                .default(7)
                .describe(
                    "Number of days of historical data to retrieve. Default is 7 days."
                ),
        },

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