list_markets
Retrieve all perpetual futures markets available for trading on the Hyperliquid exchange to view current trading options.
Instructions
List all available perpetual futures markets on Hyperliquid
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/hyperliquid_mcp/client.py:53-63 (handler)The list_markets handler function that fetches all available perpetual markets from Hyperliquid API using info.meta() and returns a list of market data including name, size_decimals, and max_leverage.
def list_markets(self) -> list[dict[str, Any]]: """List all available perpetual markets.""" meta = self.info.meta() markets = [] for asset in meta.get("universe", []): markets.append({ "name": asset["name"], "size_decimals": asset.get("szDecimals", 0), "max_leverage": asset.get("maxLeverage", 1), }) return markets - src/hyperliquid_mcp/server.py:27-31 (schema)The input schema for list_markets tool - defines that the tool takes no arguments (empty properties and required array).
Tool( name="list_markets", description="List all available perpetual futures markets on Hyperliquid", inputSchema={"type": "object", "properties": {}, "required": []}, ), - src/hyperliquid_mcp/server.py:135-136 (registration)The dispatch case that routes list_markets tool calls to the client.list_markets() method.
case "list_markets": return client.list_markets()