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.
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 |