Skip to main content
Glama

Hyperliquid order book depth and slippage: spread, depth bands, imbalance, fill price for $1k-$100k

hl_orderbook

Use when an agent sizes a Hyperliquid market order or compares liquidity. Input: coin (perp or HIP-3 xyz:TSLA), optional sizes_usd (up to 5, default 1000,10000,100000), levels (0-20). Output: JSON best bid/ask, spread bps, depth USD within 0.1/0.5/1/2%, imbalance, per size buy/sell average fill, worst price and slippage bps vs mid, top levels. Cached 3 s. Example: ?coin=BTC&sizes_usd=1000,10000 Price: $0.0036 USDC (Base or Solana) via x402.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "coin": "<coin>"
    },
    "name": "hl_orderbook"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesHyperliquid perp symbol (BTC, ETH, kPEPE) or HIP-3 dex:COIN (xyz:TSLA). Not listed or delisted: 400 before payment (not charged)
levelsNoBook levels per side to return (0-20, default 10)
sizes_usdNo1-5 comma-separated order notionals in USD, 10 to 50,000,000 (default 1000,10000,100000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and discloses useful behavior: output fields, 3-second caching, x402 payment, and price. It does not explicitly label the operation as read-only or describe rate limits, but the read-only nature is strongly implied by the market-data purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loaded with usage guidance, then structured as Input, Output, caching, example, and payment info. Every part is relevant, though the final payment/example line is somewhat compressed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description enumerates the key returned fields: best bid/ask, spread bps, depth bands, imbalance, fill prices, worst price, slippage, and top levels. Combined with the fully documented input schema and payment/caching notes, it is complete for an agent to call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents coin, levels, and sizes_usd thoroughly, including ranges and defaults. The description adds an example query and reinforces coin formats, but does not add substantial meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the resource and operation: Hyperliquid order book depth, spread, slippage, imbalance, and fill estimates for market-order sizing. It is specific enough to distinguish this from general market-data siblings, though it does not explicitly name alternatives like hl_markets or hl_perp_metrics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear when-to-use statement: sizing a Hyperliquid market order or comparing liquidity. It does not state when not to use it or explicitly route to sibling tools, so it falls short of the highest level.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources