Python functions:
screenHyperliquidMarkets(), getHyperliquidOHLCV(), getHyperliquidPriceAndBook(), getHyperliquidFunding(), getHyperliquidPositions(), getHyperliquidTrades(), screenHyperliquidWallets()Product Overview
Overview
Hyperliquid Data provides full read access to Hyperliquid, the leading on-chain perpetual futures exchange. The dataset spans seven functions covering market discovery, price history, order book depth, funding rates, and — because Hyperliquid is fully on-chain — the open positions and complete fill history of any wallet on the exchange, no authentication required. That last property is what makes this dataset unusually powerful for strategy research: on a traditional exchange you only see your own account; on Hyperliquid you can watch what the most profitable traders are holding and doing in near real time, and build strategies that follow (or fade) them.Functions at a Glance
Data Sources
All functions read from Hyperliquid’s own first-party endpoints — there is no third-party intermediary:- Public info API (
POST https://api.hyperliquid.xyz/info): market metadata and live asset context (metaAndAssetCtxs,spotMetaAndAssetCtxs), candles (candleSnapshot), L2 books (l2Book,allMids), funding history (fundingHistory), wallet positions (clearinghouseState,spotClearinghouseState), and wallet fills (userFills,userFillsByTime). This is the same API the Hyperliquid front end uses. No API key is needed; positions and fills are public on-chain data for any address. - Stats leaderboard endpoint (
stats-data.hyperliquid.xyz): the full ~40,000-wallet performance dataset behind the official app’s leaderboard page, refreshed periodically upstream. Used only byscreenHyperliquidWallets(); downloaded once and cached in-process for 10 minutes.
Ticker Convention
Hyperliquid tickers use theH: namespace prefix, consistent with other Scalar Field asset classes (X: crypto, I: indices, J: Jupiter, C: forex):
All coin values returned by these functions carry the
H: prefix, so outputs can be passed directly back as inputs. Bare API ids ('BTC') are also accepted.
Hyperliquid is a tradable venue on Scalar Field: perps (long/short) and spot pairs execute through
venue.trade() or strategy.execute(). See Trading on Hyperliquid for order semantics, funding, and connection steps.Querying the Data
screenHyperliquidMarkets()
Discover and filter Hyperliquid markets with live prices, 24h volume, open interest, and current funding — the whole perp and/or spot universe in one call.
Strategy angle: this is the universe-selection step of almost any strategy. A momentum strategy screens for the biggest 24h movers with sufficient volume; a funding-carry strategy sorts by funding_rate to find perps paying the most to shorts; a market-making study filters by volume_24h_usd and open_interest to find liquid books worth quoting.
Parameters
Return Schema
getHyperliquidOHLCV()
OHLCV candles for perp or spot coins, from 1-minute up to monthly bars. Sourced from the public candleSnapshot endpoint; the API returns at most the most recent ~5,000 candles per coin per request. Omit start and end for live mode (latest bar).
Strategy angle: the backbone of any systematic approach — backtest a moving-average crossover on daily bars, compute realized volatility for position sizing, or detect intraday breakouts on 5-minute candles. num_trades per bar is a useful activity filter that plain OHLCV feeds don’t give you: a price move on 10 trades means something different than the same move on 10,000.
Parameters
Return Schema
ReturnsDict[str, pd.DataFrame] keyed by coin. Each DataFrame:
getHyperliquidPriceAndBook()
Live mid price and aggregated L2 order book per coin. Mid prices for all coins come from one allMids call; books from the l2Book endpoint.
Strategy angle: the pre-trade sanity check. Before a strategy sizes an entry, walk the book to estimate slippage for your intended notional; a signal that looks great on close prices can be uneconomic once you account for a thin book. Book imbalance (bid depth vs ask depth) is also a short-horizon signal in its own right.
Parameters
Return Schema
ReturnsDict[str, dict] keyed by coin:
getHyperliquidFunding()
Historical hourly funding rates for perps, from the fundingHistory endpoint. Rates are decimal hourly rates (e.g. 0.0000125 = 0.00125% per hour); funding on Hyperliquid accrues every hour.
Strategy angle: funding is both a carry source and a sentiment gauge. A funding-carry strategy shorts perps with persistently positive funding (longs pay shorts) while holding spot elsewhere, collecting the rate with limited price exposure. As a contrarian signal, extreme funding marks crowded positioning — spikes in positive funding often precede long squeezes. The premium column (mark vs oracle) tells you how stretched the perp is against its reference price.
Parameters
Return Schema
getHyperliquidPositions()
Open perp positions and spot balances for any wallet — positions on Hyperliquid are public on-chain data, so no authentication is needed. Combines the perp clearinghouse state and spot balance state in one DataFrame.
Strategy angle: the core of a whale-watching or copy-trading strategy. Take wallets from screenHyperliquidWallets(), snapshot their positions on a schedule, and trade on changes: a top-decile trader flipping from long to short ETH is a signal you cannot get from price data alone. liquidation_price across many large wallets also lets you map where forced selling would cascade.
Parameters
Return Schema
One row per open perp position or nonzero spot balance:getHyperliquidTrades()
Complete fill history for any wallet, from the userFills / userFillsByTime endpoints. Without start/end the API returns the wallet’s most recent ~2,000 fills; with a start time, up to 2,000 fills from that window.
Strategy angle: where copy-trading gets precise. Positions tell you what a trader holds; fills tell you when and how they built it — do they scale in, add on dips, cut losers fast? closed_pnl per fill lets you verify a wallet’s edge trade by trade before you commit capital to mirroring it, and the crossed flag separates urgent taker flow from patient maker flow.
Hyperliquid has no public market-wide trade tape over REST, so trade queries are wallet-scoped only (unlike
getPolymarketTrades(), which can filter by market).Parameters
Return Schema
screenHyperliquidWallets()
Rank the full ~40,000-wallet universe by PnL, ROI, volume, or account value over daily, weekly, monthly, or all-time windows. Data comes from Hyperliquid’s stats leaderboard endpoint — the same source the official app’s leaderboard uses. The dataset is downloaded once and cached in-process for 10 minutes, so the first call pays a multi-second download and subsequent calls are instant.
Strategy angle: the discovery step of a copy-trading pipeline. Screen for wallets with high ROI and meaningful account value (to filter out lucky dust accounts), then feed them into getHyperliquidPositions() and getHyperliquidTrades() to validate consistency before mirroring. Comparing week vs all-time rankings also separates traders on a hot streak from durable performers.
Parameters
Return Schema
Strategy Playbook
Concrete ways to combine these functions into a strategy:- Funding carry.
screenHyperliquidMarkets(sort_by='funding_rate', min_volume=1_000_000)to find perps with extreme funding,getHyperliquidFunding()to confirm the rate is persistent rather than a one-hour spike,getHyperliquidPriceAndBook()to verify the book can absorb your size. Harvest the hourly payment with a hedged position. - Copy-trading.
screenHyperliquidWallets(sort_by='roi', min_account_value=100_000)to shortlist traders,getHyperliquidTrades()to audit their realized PnL and style, then pollgetHyperliquidPositions()on a schedule and mirror position changes. - Crowding fade. Track funding and open interest together: rising OI plus rapidly rising positive funding means crowded longs. Use
getHyperliquidOHLCV()to time the mean-reversion entry when momentum stalls. - Cross-venue signals. Hyperliquid perp funding and whale positioning in
H:BTC/H:ETHoften lead sentiment in correlated assets — use them as inputs to strategies that execute in crypto OHLCV universes (X:tickers) or even Polymarket crypto markets.