hyperliquid-market-data

Featured

Read live Hyperliquid market data from the desk computer with curl or the Python SDK - mid, mark and oracle prices, order book depth, funding (current, predicted, historical), open interest, volume, candles, perp and spot metadata, margin tiers, and how to save datasets for the strategy lab. Read-only, no key. Use for any market brief, depth read, funding question or data pull.

Data & Documents 60 stars 11 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
59
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Hyperliquid market data All reads are `POST /info` with a JSON body; no key, no signing. Market data is usually read from **mainnet** even when the desk trades on testnet, because testnet prices and books are thin; say which network a figure came from. Every figure the desk reports carries source (request type), network and UTC time. ```bash BASE=https://api.hyperliquid.xyz # or https://api.hyperliquid-testnet.xyz hl() { curl -sS -m 15 -X POST "$BASE/info" -H 'Content-Type: application/json' -d "$1"; } ``` Python header (SDK): ```python from hyperliquid.info import Info from hyperliquid.utils import constants info = Info(constants.MAINNET_API_URL, skip_ws=True) # TESTNET_API_URL for testnet ``` ## Prices ```bash hl '{"type":"allMids"}' | jq '{BTC, ETH, SOL}' # mid per coin, strings ``` `allMids` falls back to last trade when the book is empty. For mark, oracle and mid together use `metaAndAssetCtxs` below. Python: `info.all_mids()`. ## Market metadata, funding, open interest, volume ```bash hl '{"type":"metaAndAssetCtxs"}' | jq -r ' .[0].universe as $u | .[1] | to_entries[] | . as $e | $u[$e.key] as $m | select($m.name == "BTC" or $m.name == "ETH" or $m.name == "SOL") | [$m.name, $e.value.midPx, $e.value.markPx, $e.value.oraclePx, $e.value.funding, $e.value.openInterest, $e.value.dayNtlVlm, $e.value.premium, $m.maxLeverage, $m.szDecimals] | @tsv' ``` Fields per asset (same order as `meta.universe`): `midPx`, `markPx`, ...

Details

Author
galleonlabs
Repository
galleonlabs/hypergrok-trading-desk
Created
3 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category