What problem does it solve? Managing perpetual futures positions on Hyperliquid requires precise handling of leverage settings, margin modes, liquidation risk, and order cleanup, and mistakes like orphaned stop orders or wrong close types can cause real losses. ## Core Features & Use Cases - Position and Margin Reads: Query clearinghouseState for open positions, margin usage, liquidation prices, and per-market margin tiers via the Hyperliquid info API. - Leverage and Margin Writes: Set cross or isolated leverage per market and add isolated margin, gated through desk_send.py with a Risk PASS and policy-gate approval. - Safe Position Closes: Close positions with reduce-only IOC orders at slippage-bounded prices, then clean up orphaned TP/SL orders only after confirming a full close. - Use Case: A Risk Manager agent checks every open position for a resting reduce-only trigger order using frontendOpenOrders, reports unprotected positions to the Desk Lead, and the Execution Trader closes an ETH long at a 30 bps slippage bound. ## Quick Start Ask the agent to read my current Hyperliquid positions and margin usage on testnet and report each position's liquidation distance and protection status.