waiaas_hl_get_spot_markets
Retrieve the list of available spot markets on Hyperliquid, including trading pairs and token information.
Instructions
Get Hyperliquid spot market list (trading pairs, token info).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "waiaas_hl_get_spot_markets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for 'waiaas_hl_get_spot_markets' tool. It makes a GET request to '/v1/hyperliquid/spot/markets' via the apiClient and returns the result. No parameters are required.
// hl_get_spot_markets server.tool( 'waiaas_hl_get_spot_markets', 'Get Hyperliquid spot market list (trading pairs, token info).', {}, async () => { const result = await apiClient.get('/v1/hyperliquid/spot/markets'); return toToolResult(result); }, ); - Empty input schema (no parameters) for the spot markets tool, defined inline as an empty object literal.
{}, - packages/mcp/src/tools/hyperliquid.ts:15-16 (registration)The 'registerHyperliquidTools' function registration, called from server.ts line 127. It receives the MCP server, apiClient, and walletContext.
export function registerHyperliquidTools( server: McpServer, - packages/mcp/src/server.ts:127-127 (registration)The call site in createMcpServer that registers all Hyperliquid tools, including the spot markets tool.
registerHyperliquidTools(server, apiClient, walletContext); - packages/mcp/src/api-client.ts:37-37 (helper)The 'toToolResult' helper used by the handler to convert the API response to MCP CallToolResult format.
export function toToolResult<T>(result: ApiResult<T>): CallToolResult {