Individual skill
hyperliquid-positions
Manage Hyperliquid perp positions and margin from the desk computer - read positions and margin, set leverage and cross/isolated mode, add isolated margin, understand margin tiers and liquidation price, close a position with a reduce-only IOC, and clean up orphaned orders. Write actions are Execution Trader only, on an approved ticket. Use for leverage changes, closes, protection checks and margin questions.
skills/hyperliquid-positions/SKILL.md
Source commit 8ec18c3fe979d7d5978ee666301e9b59ff498f73
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 10, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 485
- Repository last updated
- Nov 4, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- defi Repository topic
- grok-bot Repository topic
- hyperliquid Repository topic
- trading Repository topic
- ai-agents Repository topic
- open-source Repository topic
- trading-desk Repository topic
- agent-plugins Repository topic
- claude-code Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
Read excerpt
# Hyperliquid positions and margin
Reads here are for everyone (Risk Manager first); the write actions (`updateLeverage`, `updateIsolatedMargin`, closes) are Execution Trader only, on a ticket. Order mechanics are in `hyperliquid-orders`.
## Concepts
- **Cross margin** (default): all cross positions share the account's margin, and unrealised PnL counts as margin; liquidation is account-wide. **Isolated margin:** the position has its own margin; only that margin is at risk, and you can add to or remove from it (some markets are `strictIsolated` and refuse removal; HIP-3 markets may be `noCross`).
- **Leverage** is set per market and per mode with `updateLeverage`; it caps position size against margin, it is not "how much you win". Max leverage is per market and **tiered by notional** (see margin tiers).
- **Margin tiers:** each perp has a margin table (`meta.marginTables`, matched to the asset via `marginTableId`) listing notional thresholds and the max leverage allowed above each. Bigger positions get less leverage.
- **Maintenance margin** is half of the initial margin at the max leverage of the applicable tier (so between 1.25% for a 40x market and 16.7% for a 3x market); liquidation happens when account (cross) or position (isolated) equity falls below maintenance margin, on **mark** price. Large positions are liquidated partially first; the cross liquidation price does not depend on your leverage setting.
- **Liquidation price** is reported by the exchange per position (`liquidationPx`); use that, do not recompute.
- **Funding** is exchanged every hour between longs and shorts at the market's funding rate; it changes equity while a position is open.
- **Closing** is an order in the opposite direction with `reduceOnly`. Full close at market: reduce-only IOC at a slippage-bounded price for the live position size.