Skip to main content
Glama
talkincode

HyperLiquid MCP Server

by talkincode

market_open_position

Open a new position at market price on HyperLiquid. Set coin, side, and token count to execute immediately with a market order.

Instructions

Open a new position at market price using HyperLiquid's market_open for optimal execution

Args: coin: Trading pair (e.g., "BTC", "ETH") side: Position side ("buy" for long, "sell" for short) size: Number of tokens/coins to trade (NOT dollar value - e.g., 0.1 for 0.1 SOL, not $20) client_order_id: Optional client order ID for tracking

IMPORTANT: The 'size' parameter is the NUMBER OF TOKENS, not dollar value. If user wants "$20 worth of SOL" at current price ~$150, calculate: $20 ÷ $150 = 0.133 SOL

Note: This uses HyperLiquid's native market_open method for the best execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYes
sideYes
sizeYes
client_order_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly warns that 'size' is the number of tokens, not dollar value, and provides a calculation example—this is critical, non-obvious behavior. It also mentions it uses HyperLiquid's market_open method. It does not disclose potential side effects like immediate slippage or margin requirements, but the most important behavioral trap is covered.

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

Conciseness5/5

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

The description is well-structured with labeled parameters and a clear callout for the size nuance. The example calculation is necessary and earns its place. It is not overly verbose; every sentence contributes value, and the critical warning is front-loaded before the detailed example.

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

Completeness4/5

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

Given the presence of an output schema, not explaining return values is acceptable. The description covers the essential parameters and the key behavioral trap. It could add context about account prerequisites or that this opens a perp position, but the tool's purpose and invocation are clear enough for an agent. It is nearly complete for a trading action.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must fully compensate, and it does. It explains each parameter: coin (e.g., 'BTC'), side ('buy' for long, 'sell' for short), size (with a detailed example of converting dollar value to tokens), and client_order_id (optional tracking ID). This adds substantial meaning beyond the bare schema, which only lists types and defaults.

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

Purpose5/5

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

The description clearly states the tool's function: 'Open a new position at market price using HyperLiquid's market_open for optimal execution.' This is a specific verb+resource, and it distinguishes from sibling tools like market_close_position and place_limit_order. The scope (opening at market) is unambiguous.

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?

The description provides clear context: it is for opening positions at market price, and it recommends the use of HyperLiquid's native market_open for optimal execution. While it does not explicitly exclude alternative tools (e.g., limit orders), the scenario is clearly defined, and the 'optimal execution' note gives usage guidance. It lacks explicit 'when not to use' but is well above implied usage.

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

Install Server

Other Tools

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/talkincode/hyperliquid-mcp-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server