Close position
close_positionClose an open position at market (reduce-only). fraction in (0, 1], default 1 = the whole position.
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": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Market name as on Hyperliquid, e.g. BTC, ETH, xyz:GOLD | |
| fraction | No | ||
| client_order_id | No | Optional idempotency id (0x + 32 hex), as for place_order. |