Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

historical_token_prices

Retrieve historical ERC20 and native token price data for specified date ranges across multiple blockchain networks. Query token price history in various currencies to analyze market trends and performance.

Instructions

Get the historical prices of one (or many) large cap ERC20 tokens between specified date ranges. Also supports native tokens. Required: chainName (blockchain network), quoteCurrency (price currency), contractAddress (token contract), from (start date YYYY-MM-DD), to (end date YYYY-MM-DD). Optional: pricesAtAsc (set to true for chronological ascending order, default is false for descending order). Returns historical token prices for the specified time range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
quoteCurrencyYesCurrency to quote token prices in (e.g., 'USD', 'EUR'). This determines the currency for historical price data.
contractAddressYesThe token contract address to get historical prices for. Use the native token address for native token prices. Supports ENS, RNS, Lens Handle, and Unstoppable Domain resolution.
fromYesStart date for historical price data in YYYY-MM-DD format (e.g., '2023-01-01').
toYesEnd date for historical price data in YYYY-MM-DD format (e.g., '2023-12-31').
pricesAtAscNoSort prices in ascending chronological order. Default is false (descending order, newest first).

Implementation Reference

  • Handler function for historical_token_prices tool.
    async (params) => {
        try {
            const response =
                await goldRushClient.PricingService.getTokenPrices(
                    params.chainName as Chain,
                    params.quoteCurrency as Quote,
                    params.contractAddress,
                    {
                        from: params.from,
                        to: params.to,
                        pricesAtAsc: params.pricesAtAsc,
                    }
                );
            return {
                content: [
                    {
                        type: "text",
                        text: stringifyWithBigInt(response.data),
                    },
                ],
            };
        } catch (error) {
            return {
                content: [{ type: "text", text: `Error: ${error}` }],
                isError: true,
            };
        }
    }
  • Zod schema definition for historical_token_prices inputs.
    {
        chainName: z
            .enum(Object.values(ChainName) as [string, ...string[]])
            .describe(
                "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
            ),
        quoteCurrency: z
            .enum(Object.values(validQuoteValues) as [string, ...string[]])
            .describe(
                "Currency to quote token prices in (e.g., 'USD', 'EUR'). This determines the currency for historical price data."
            ),
        contractAddress: z
            .string()
            .describe(
                "The token contract address to get historical prices for. Use the native token address for native token prices. Supports ENS, RNS, Lens Handle, and Unstoppable Domain resolution."
            ),
        from: z
            .string()
            .describe(
                "Start date for historical price data in YYYY-MM-DD format (e.g., '2023-01-01')."
            ),
        to: z
            .string()
            .describe(
                "End date for historical price data in YYYY-MM-DD format (e.g., '2023-12-31')."
            ),
        pricesAtAsc: z
            .boolean()
            .optional()
            .describe(
                "Sort prices in ascending chronological order. Default is false (descending order, newest first)."
            ),
    },
  • Tool registration for historical_token_prices.
    server.tool(
        "historical_token_prices",
        "Get the historical prices of one (or many) large cap ERC20 tokens between specified date ranges. Also supports native tokens.\n" +
            "Required: chainName (blockchain network), quoteCurrency (price currency), contractAddress (token contract), from (start date YYYY-MM-DD), to (end date YYYY-MM-DD).\n" +
            "Optional: pricesAtAsc (set to true for chronological ascending order, default is false for descending order).\n" +
            "Returns historical token prices for the specified time range.",
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden and discloses some behavioral traits: the 'large cap' token limitation, native token support, batch capability ('one or many'), and default descending sort order. However, it omits error handling behavior, pagination details, maximum date range limits, and rate limiting concerns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with four sentences: purpose statement, required parameters, optional parameters, and return value. The front-loading of the core action is effective, though the final sentence ('Returns historical token prices...') is somewhat redundant with the opening statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description should ideally detail the return structure (e.g., array of timestamped price objects), but only provides a generic return statement. It adequately covers the input requirements and domain constraints (large cap tokens) for a 6-parameter tool, but leaves gaps regarding the response format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description organizes parameters into Required and Optional sections, which adds structural clarity, but largely repeats information already present in the schema property descriptions (date formats, default values) without adding significant semantic depth or usage examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves 'historical prices of one (or many) large cap ERC20 tokens' and supports native tokens, using specific verbs and resources. It distinguishes from balance-checking siblings (historical_token_balances) by focusing on prices, though it doesn't explicitly contrast with pool_spot_prices or other price-related tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description clearly enumerates required versus optional parameters, it provides no guidance on when to select this tool over siblings like historical_token_balances (prices vs balances) or historical_portfolio_value. There are no exclusions, prerequisites, or decision criteria for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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