close_all_positions
Close all open perpetual positions on HyperLiquid at once; if the endpoint times out or errors, close each position individually for reliable execution.
Instructions
Close all open perpetual positions on HyperLiquid. Known unreliable: the backend endpoint frequently returns TIMEOUT or 400 / JSON parse errors. Prefer close_perp_position per coin.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "close_all_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | No | GDEX API key for AES encryption | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| walletAddress | No | Control wallet address | |
| sessionPrivateKey | No | Session private key from sign-in |