Skip to main content
Glama

get_spot_metadata

Fetch metadata about spot markets on Hyperliquid exchange, including trading pairs and contract details like symbol and tick size.

Instructions

Fetch metadata about spot markets on the Hyperliquid exchange. Parameters: include_asset_ctxs (bool, optional): If True, includes asset contexts with metadata. Defaults to False. ctx (Context, optional): The MCP context object for accessing server state. Returns: str: A JSON string containing metadata about spot markets, including trading pairs and contract details (e.g., symbol, tick size). Returns a JSON string with an error message if the query fails.

Input Schema

NameRequiredDescriptionDefault
include_asset_ctxsNo

Input Schema (JSON Schema)

{ "properties": { "include_asset_ctxs": { "default": false, "title": "Include Asset Ctxs", "type": "boolean" } }, "type": "object" }

Implementation Reference

  • main.py:359-376 (handler)
    The handler function for the 'get_spot_metadata' tool. It is registered via the @mcp.tool() decorator. Fetches spot metadata (or with asset contexts) from the Hyperliquid info SDK and returns it as JSON, with error handling.
    @mcp.tool() async def get_spot_metadata(include_asset_ctxs: bool=False, ctx: Context=None) -> str: """ Fetch metadata about spot markets on the Hyperliquid exchange. Parameters: include_asset_ctxs (bool, optional): If True, includes asset contexts with metadata. Defaults to False. ctx (Context, optional): The MCP context object for accessing server state. Returns: str: A JSON string containing metadata about spot markets, including trading pairs and contract details (e.g., symbol, tick size). Returns a JSON string with an error message if the query fails. """ try: data = info.spot_meta_and_asset_ctxs() if include_asset_ctxs else info.spot_meta() return json.dumps(data) except Exception as e: return json.dumps({"error": f"Failed to fetch spot metadata: {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