Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_coin_funding_history

Retrieve historical funding rate data for cryptocurrencies by specifying coin symbol and time range to analyze market trends.

Instructions

Fetch the funding rate history for a specific coin.

Parameters:
    coin_name (str): The trading symbol (e.g., 'BTC', 'ETH').
    start_time (str): The start time for the funding history in ISO 8601 format (e.g., '2025-01-01T00:00:00Z').
    end_time (str): The end time for the funding history in ISO 8601 format (e.g., '2025-12-31T23:59:59Z').
    ctx (Context): The MCP context object for accessing server state.

Returns:
    str: A JSON string containing a list of funding rate records, each with details such as funding rate and timestamp.
        Returns a JSON string with an error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coin_nameYes
start_timeYes
end_timeYes

Implementation Reference

  • main.py:123-146 (handler)
    The handler function for the 'get_coin_funding_history' tool. It is decorated with @mcp.tool(), which registers it. Converts ISO 8601 timestamps to milliseconds and uses the Hyperliquid SDK's info.funding_history() to fetch the data, returning it as JSON or an error message.
    # Tool: Get coin funding history
    @mcp.tool()
    async def get_coin_funding_history(coin_name: str, start_time: str, end_time: str, ctx: Context) -> str:
        """
        Fetch the funding rate history for a specific coin.
    
        Parameters:
            coin_name (str): The trading symbol (e.g., 'BTC', 'ETH').
            start_time (str): The start time for the funding history in ISO 8601 format (e.g., '2025-01-01T00:00:00Z').
            end_time (str): The end time for the funding history in ISO 8601 format (e.g., '2025-12-31T23:59:59Z').
            ctx (Context): The MCP context object for accessing server state.
    
        Returns:
            str: A JSON string containing a list of funding rate records, each with details such as funding rate and timestamp.
                Returns a JSON string with an error message if the query fails.
        """
        try:
            start_ms = int(iso8601.parse_date(start_time).timestamp() * 1000)
            end_ms = int(iso8601.parse_date(end_time).timestamp() * 1000)
            data = info.funding_history(coin_name, start_ms, end_ms)
            return json.dumps(data)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch coin funding history: {str(e)}"})
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it describes the return format (JSON string with list of records), error handling (returns error message on failure), and data structure details (funding rate and timestamp fields). It doesn't mention rate limits, authentication needs, or pagination, but provides solid operational context.

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

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by well-organized parameter and return sections. Every sentence earns its place by providing essential information without redundancy. The formatting with bullet-like sections enhances readability.

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

Completeness4/5

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

For a 3-parameter tool with no annotations and no output schema, the description provides good coverage: clear purpose, parameter semantics, return format, and error handling. It doesn't explain sibling differentiation or advanced behavioral aspects like rate limits, but covers the core operational context adequately.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing detailed semantic information for all 3 parameters: coin_name specifies trading symbols with examples, start_time and end_time specify ISO 8601 format with concrete examples. This adds significant value beyond the bare schema.

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

Purpose5/5

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

The description clearly states the specific action ('Fetch') and resource ('funding rate history for a specific coin'), distinguishing it from siblings like get_user_funding_history (user-specific) or get_candles_snapshot (price data). It precisely identifies what the tool does.

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

Usage Guidelines3/5

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

The description implies usage through the specific resource focus (coin funding history), but doesn't explicitly state when to use this tool versus alternatives like get_user_funding_history or other data-fetching siblings. No explicit exclusions or prerequisites are provided.

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/kukapay/hyperliquid-info-mcp'

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