hyperliquid-account

Solid

Read a Hyperliquid account from the desk computer - positions and margin, spot balances, open orders including trigger details, fills, funding paid, ledger updates, order status by oid or cloid, historical orders, portfolio history, fee tier and rate-limit budget - with curl and Python SDK examples. Read-only, needs only the account address. Use for sizing inputs, book checks, reconciliation and reviews.

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 account reads All reads are `POST /info`, unsigned. Use the **account** address (the main wallet the desk trades for), never the API wallet's address: queries on an agent address return empty results. ```bash ADDR=$HYPERLIQUID_ACCOUNT_ADDRESS BASE=$([ "$HYPERLIQUID_NETWORK" = mainnet ] && echo https://api.hyperliquid.xyz || echo https://api.hyperliquid-testnet.xyz) hl() { curl -sS -m 15 -X POST "$BASE/info" -H 'Content-Type: application/json' -d "$1"; } ``` ```python import os from hyperliquid.info import Info from hyperliquid.utils import constants from hyperliquid.utils.types import Cloid NETWORK = os.environ.get("HYPERLIQUID_NETWORK", "testnet") info = Info(constants.MAINNET_API_URL if NETWORK == "mainnet" else constants.TESTNET_API_URL, skip_ws=True) ADDR = os.environ["HYPERLIQUID_ACCOUNT_ADDRESS"] ``` ## Perp account state ```bash hl "{\"type\":\"clearinghouseState\",\"user\":\"$ADDR\"}" | jq '{ time, accountValue: .marginSummary.accountValue, totalNtlPos: .marginSummary.totalNtlPos, totalMarginUsed: .marginSummary.totalMarginUsed, withdrawable, crossMaintenanceMarginUsed, positions: [.assetPositions[].position | {coin, szi, entryPx, positionValue, unrealizedPnl, returnOnEquity, liquidationPx, marginUsed, leverage, maxLeverage, cumFunding: .cumFunding.sinceOpen}]}' ``` Python: `info.user_state(ADDR)`. `szi` is signed size; `leverage` is `{type: cross|isolated, value, rawUsd?}`; `crossMarginSummary` mirrors `marginSummary` for the c...

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