Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_user_open_orders

Retrieve all open trading orders for a specific Hyperliquid account to monitor active positions and pending trades.

Instructions

Fetch all open orders for a specific user account.

Parameters:
    account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d').
    ctx (Context): The MCP context object for accessing server state.

Returns:
    str: A JSON string containing a list of open orders, each with details such as order ID, symbol, size, price,
        and status. Returns a JSON string with an error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYes

Implementation Reference

  • main.py:44-62 (handler)
    The primary handler for the 'get_user_open_orders' MCP tool. Decorated with @mcp.tool() for registration. Includes type hints and comprehensive docstring serving as schema. Executes the core logic by calling info.open_orders(account_address) and serializing the result to JSON, with exception handling.
    # Tool: Get user open orders
    @mcp.tool()
    async def get_user_open_orders(account_address: str, ctx: Context) -> str:
        """
        Fetch all open orders for a specific user account.
    
        Parameters:
            account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d').
            ctx (Context): The MCP context object for accessing server state.
    
        Returns:
            str: A JSON string containing a list of open orders, each with details such as order ID, symbol, size, price,
                and status. Returns a JSON string with an error message if the query fails.
        """
        try:
            open_orders = info.open_orders(account_address)
            return json.dumps(open_orders)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch user open orders: {str(e)}"})
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that the tool fetches data (read-only implied) and returns JSON with either order details or an error message, which covers basic behavior. However, it lacks details on rate limits, authentication needs, pagination, or what constitutes a 'fails' condition, leaving gaps in behavioral understanding.

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 well-structured with a clear purpose statement followed by parameter and return sections. Every sentence adds value: the first defines the tool's function, and the subsequent lines explain inputs and outputs. It's appropriately sized without redundancy, though the mention of 'ctx' parameter not in the schema slightly reduces efficiency.

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 no annotations, no output schema, and low schema coverage (0%), the description provides basic completeness by explaining the tool's purpose, parameter, and return format. However, for a tool that interacts with user data and returns complex JSON, it lacks details on error handling, data structure examples, or performance considerations, making it minimally adequate but with clear gaps.

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

Parameters4/5

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

The description adds significant meaning beyond the input schema, which has 0% coverage. It explains that 'account_address' is a Hyperliquid account address with an example format, clarifying the parameter's purpose and expected value. Since there's only one parameter, this compensation is effective, though it doesn't detail the 'ctx' parameter mentioned in the description but not in the 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 all open orders') and target resource ('for a specific user account'), distinguishing it from sibling tools like get_user_fees, get_user_trade_history, or get_user_order_by_oid which focus on different user data. The verb+resource combination is precise and unambiguous.

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 when needing open orders for a user, but provides no explicit guidance on when to use this versus alternatives like get_user_order_by_oid for specific orders or get_user_trade_history for completed trades. No exclusions or prerequisites are mentioned, leaving usage context inferred rather than stated.

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