get_open_orders
Retrieve all active orders for your connected wallet on the Hyperliquid exchange to monitor pending trades and manage positions.
Instructions
List all open orders for the connected wallet
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/hyperliquid_mcp/client.py:94-109 (handler)The actual handler implementation that fetches open orders from Hyperliquid. Validates wallet_address is set, calls info.open_orders() API, and formats the response with oid, symbol, side, price, size, and timestamp fields.
def get_open_orders(self) -> list[dict[str, Any]]: """List all open orders.""" if not self.wallet_address: raise ValueError("HYPERLIQUID_WALLET_ADDRESS is required.") orders = self.info.open_orders(self.wallet_address) return [ { "oid": o.get("oid"), "symbol": o.get("coin"), "side": o.get("side"), "price": o.get("limitPx"), "size": o.get("sz"), "timestamp": o.get("timestamp"), } for o in orders ] - src/hyperliquid_mcp/server.py:55-59 (registration)Tool registration in the MCP server. Defines the tool name, description, and empty input schema (no parameters required). This is where the tool is declared and made available to MCP clients.
Tool( name="get_open_orders", description="List all open orders for the connected wallet", inputSchema={"type": "object", "properties": {}, "required": []}, ), - src/hyperliquid_mcp/server.py:141-142 (registration)Dispatch routing that maps the tool name to the actual handler call. When 'get_open_orders' is invoked, this case routes it to client.get_open_orders().
case "get_open_orders": return client.get_open_orders() - src/hyperliquid_mcp/server.py:55-59 (schema)Input/output schema definition for the tool. The inputSchema is empty (no arguments required), meaning this tool takes no parameters.
Tool( name="get_open_orders", description="List all open orders for the connected wallet", inputSchema={"type": "object", "properties": {}, "required": []}, ),