Private keys live only on the server's .env file — never sent to the browser or logged.
Read before use:
- The server process itself only ever binds to localhost — if deployed remotely, it's reachable only through a reverse proxy over HTTPS, gated by the login above and a session cookie.
- Private keys must be Hyperliquid master account keys (the ones behind MetaMask) — API/agent wallets cannot authorize withdrawals.
- Set PRIVATE_KEY (required) and optionally PRIVATE_KEY_2 in .env to manage a second account alongside the first. Both share the same destination address.
- The destination address can be any address — Hyperliquid's withdraw action lets you specify it directly.
- Withdrawals only pull from an account's main Perps balance. Spot and any HIP-3 dex balance (EXTRA_PERP_DEXES) are swept into Perps first automatically.
- There is a small (~$1) withdrawal fee per account, and it takes a few minutes to land on Arbitrum.
- Open positions on a HIP-3 dex lock margin until closed — this tool can show them and close them with reduce-only market orders. Closing requires typing a confirmation phrase, since it realizes P&L and executes real trades. Market orders on thin books aren't guaranteed to fully fill in one shot, so the tool re-checks the actual position afterward and retries at a more aggressive price (up to 3 attempts) — and reports exactly what's still open if it truly can't fill, rather than assuming success.
- Double-check the destination address before confirming. All of this is irreversible.
Loading account status…
Flat All Positions (All Accounts) & Withdraw Everything
Closes every open position on every configured account, then sweeps and withdraws each account's entire
resulting balance to the destination address below. One combined action across all accounts.