hyperliquid-positions

Solid

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.

AI & Automation 4 stars 0 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

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

Details

Author
galleonlabs
Repository
galleonlabs/hypergrok-trading-desk
Created
5 days ago
Last Updated
3 days ago
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category