Skip to main content
Glama
kukapay

hyperliquid-info-mcp

get_user_order_by_oid

Retrieve specific order details using order ID for a Hyperliquid account. Returns order information including symbol, size, price, and status.

Instructions

Fetch details of a specific order by its order ID for a user account. Parameters: account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d'). oid (int): The order ID to query. ctx (Context): The MCP context object for accessing server state. Returns: str: A JSON string containing the order details, including symbol, size, price, and status. Returns a JSON string with an error message if the query fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYes
oidYes

Implementation Reference

  • main.py:277-277 (registration)
    Registration of the get_user_order_by_oid tool using the @mcp.tool() decorator.
    @mcp.tool()
  • main.py:278-295 (handler)
    The handler function implements the tool logic by calling Hyperliquid's info.query_order_by_oid API and returning the JSON response, with error handling.
    async def get_user_order_by_oid(account_address: str, oid: int, ctx: Context) -> str: """ Fetch details of a specific order by its order ID for a user account. Parameters: account_address (str): The Hyperliquid account address (e.g., '0xcd5051944f780a621ee62e39e493c489668acf4d'). oid (int): The order ID to query. ctx (Context): The MCP context object for accessing server state. Returns: str: A JSON string containing the order details, including symbol, size, price, and status. Returns a JSON string with an error message if the query fails. """ try: data = info.query_order_by_oid(account_address, oid) return json.dumps(data) except Exception as e: return json.dumps({"error": f"Failed to fetch user order by oid: {str(e)}"})

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