close_position
Close open positions on HyperLiquid by specifying a coin and percentage. Handles both full and partial closure using market or limit orders.
Instructions
Close a position (full or partial)
Args: coin: Trading pair (e.g., "BTC", "ETH") percentage: Percentage of position to close (default: 100.0 for full close)
Note: For 100% closure, uses market_close_position for optimal execution. For partial closure, you'll need to use limit orders as HyperLiquid's market_close closes all positions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | ||
| percentage | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||