market_close_position
Close all open positions for a specified trading pair at the current market price. Automatically calculates the required side and size to exit the entire position.
Instructions
Close all positions for a coin at market price using HyperLiquid's market_close
Args: coin: Trading pair (e.g., "BTC", "ETH") client_order_id: Optional client order ID for tracking
Note: This closes ALL positions for the specified coin. HyperLiquid's market_close method automatically determines the correct side and size to close all positions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | ||
| client_order_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||