Skip to content

The data layer for hyperliquid so we can onboard billions or normies with millions of apps

Notifications You must be signed in to change notification settings

moondevonyt/Hyperliquid-Data-Layer-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hyperliquid Data Layer API

The Rigged Game Ends Here

Wall Street has been playing a rigged game for decades.

They see your positions. They see your liquidations. They hunt your stops. They know exactly where to push the price to wipe you out.

But you? You've been blind.

When hedge funds open massive positions, you don't see it. When institutions are about to get liquidated, you don't see it. When smart money is accumulating, you don't see it.

They see everything. You see nothing.

That's how Wall Street has worked for your entire life. The house always wins because the house can see everyone's cards.

Until now.


Enter Hyperliquid

Hyperliquid is building something different. An open financial system. A decentralized exchange that's already doing more volume than most centralized exchanges. A blockchain where everything is transparent.

They're calling themselves the housecoin of all finance.

Why? Because they're not just building another exchange. They're rebuilding the entire financial system on a foundation of transparency. On Hyperliquid, everyone can see what used to be hidden.

The liquidations? Visible. The whale positions? Visible. The smart money flows? Visible.

For the first time in history, regular traders can see what Wall Street has always seen.


Why This Data Layer Exists

Here's the problem: Hyperliquid opened up all this data, but nobody built an easy way to access it.

Until now, there were zero open node providers creating a data layer for Hyperliquid. The data was there, but developers couldn't easily tap into it.

I'm Moon Dev, and I built this data layer because I believe in the vision.

My vision for Hyperliquid:

  • Billions of users on an open financial system
  • Thousands of successful apps serving those users
  • Millions of apps being built by developers worldwide

But here's the thing: before we get a billion people on Hyperliquid, we need thousands of great apps. Before we get thousands of apps, developers need data. Easy data. Fast data. Real data.

That's why I built the first open data layer for Hyperliquid.

I'm already building the first major consumer app on this data layer - a Quant App that helps regular traders compete with institutions. It helps you take over liquidations, set intelligent limit orders, and manage risk in ways humans simply can't do manually.

But one app isn't enough. We need thousands of apps. And for that, we need thousands of developers with access to this data.

That's you.


What You Get

This data layer gives you access to everything Wall Street kept hidden:

What You Can See Why It Matters
Liquidations See when positions are about to get wiped out - in real-time
Multi-Exchange Liqs Combined liquidations from Hyperliquid, Binance, Bybit, OKX
HIP3 Liquidations Stocks, Commodities, Indices & FX liquidations (TSLA, GOLD, XYZ100, EUR)
HIP3 Market Data (NEW!) Multi-dex tick data: 51 symbols across xyz, flx, hyna, km
Whale Positions Track positions for any of 148 symbols (BTC: $1.9B, ETH: $2.7B, HYPE: $528M)
Buyer Tracking $5k+ buyers on HYPE/SOL/XRP/ETH - accumulation signals
Smart Money Rankings Top 100 profitable traders vs Bottom 100
Trading Signals Know when smart money is buying or selling
Any Wallet's Positions Look up any Hyperliquid address and see their full portfolio
Trade History Get complete fill history for any wallet
HLP Strategies See inside Hyperliquid's $210M+ market-making protocol
HLP Sentiment THE BIG ONE! Z-scores showing retail positioning (squeeze signals)
HLP Flip Tracker (NEW!) Live delta + historical flips when HLP crosses long↔short
Order Flow Buy pressure vs sell pressure, cumulative delta
Live Prices Real-time tick data for all major coins
Blockchain Events Transfers, swaps, deposits - as they happen
All Depositors Canonical list of every address that ever bridged to Hyperliquid
Market Data (NEW!) All 224 prices + funding + OI - NO RATE LIMITS
Orderbooks Full L2 orderbook (~20 levels) - replaces Hyperliquid's rate-limited call
Account State Full account data for any wallet - NO RATE LIMITS
Fills (NEW!) Trade fills in Hyperliquid-compatible format - drop-in replacement
Candles (80 symbols!) OHLCV candles (1m-1d) for 80 symbols: majors, DeFi, memes (FARTCOIN, TRUMP...)
Tick Data (80 symbols!) Raw price ticks with custom time windows for any tracked symbol

This is the data that used to cost hedge funds millions of dollars. Now it's accessible to anyone with an API key.


Quick Start

Step 1: Get Your API Key

Visit https://moondev.com to get your free API key. Check out the full docs for detailed guides.

Step 2: Install Dependencies

pip install requests rich python-dotenv

Step 3: Set Your API Key

Create a .env file:

MOONDEV_API_KEY=your_api_key_here

Step 4: Run Any Example

python examples/01_liquidations.py        # See real-time liquidations
python examples/09_smart_money.py         # Track smart money
python examples/12_hlp_positions.py       # See HLP's $210M positions
python examples/14_multi_liquidations.py  # All exchanges: Hyperliquid, Binance, Bybit, OKX
python examples/15_buyers.py              # $5k+ buyers on HYPE/SOL/XRP/ETH
python examples/16_depositors.py          # All Hyperliquid depositors
python examples/19_market_data.py         # Prices, orderbooks, accounts - NO RATE LIMITS!
python examples/20_hip3_liquidations.py   # HIP3 liqs: stocks, commodities, indices, FX
python examples/21_hip3_market_data.py    # HIP3 candles & ticks: TSLA, GOLD, EUR, etc.

That's it. You're now seeing what Wall Street sees.


API Examples

Every example is a standalone Python script with beautiful terminal output. Run any of them to see live data.

File What It Shows
01_liquidations.py Real-time liquidation heatmaps, top liqs, long/short breakdowns
02_positions.py Whale positions for any symbol (148 symbols! Use: 02_positions.py BTC)
03_whales.py Whale addresses, recent trades, smart money moves
04_events.py Live blockchain events, transfers, swaps, deposits
05_contracts.py High-value contracts, activity tracking
06_ticks.py Live prices, historical charts, volatility
07_orderflow.py Buy/sell pressure, cumulative delta, imbalance
08_trades.py Trade stream, large trades, volume analysis
09_smart_money.py Top 100 smart money, Bottom 100 dumb money, trading signals
10_user_positions.py Get all positions for ANY Hyperliquid wallet
11_user_fills.py Historical fills, PnL analysis, win/loss streaks
12_hlp_positions.py All 7 HLP strategies, trades, liquidators, deltas
13_binance_liquidations.py Binance Futures liquidations for comparison
14_multi_liquidations.py Combined liqs from Hyperliquid, Binance, Bybit, OKX
15_buyers.py $5k+ buyers on HYPE/SOL/XRP/ETH (buyers only - accumulation signals!)
16_depositors.py All Hyperliquid depositors - canonical list of bridged addresses
17_hlp_sentiment.py THE BIG ONE! HLP z-scores showing retail positioning
18_hlp_analytics.py HLP liquidators, market maker, timing, correlation
19_market_data.py All prices, orderbooks, account state - NO RATE LIMITS
20_hip3_liquidations.py HIP3 liquidations - stocks, commodities, indices, FX
21_hip3_market_data.py NEW! HIP3 OHLCV candles & tick data for 33 TradFi assets

See the examples/README.md for the API reference, or visit https://moondev.com/docs for the full documentation.


Market Data API (NO RATE LIMITS!)

These endpoints replace Hyperliquid's rate-limited API calls. All requests go through Moon Dev's node - no more 429 errors!

Endpoints

Endpoint Replaces Description
GET /api/prices metaAndAssetCtxs All 224 coin prices + funding rates + open interest
GET /api/price/{coin} - Quick single-coin price with bid/ask/spread
GET /api/orderbook/{coin} l2Book Full L2 orderbook (~20 levels each side)
GET /api/account/{address} clearinghouseState Full account state for any wallet
GET /api/fills/{address} userFills Trade fills in Hyperliquid-compatible format
GET /api/candles/{coin} candleSnapshot OHLCV candles (1m, 5m, 15m, 1h, 4h, 1d)
GET /api/candles/symbols - List all 80 tracked symbols
GET /api/ticks/{symbol} - Raw tick data with custom time windows

Symbol Discovery

80 symbols tracked based on $750k+ daily volume:

# Get all available symbols
symbols = api.get_candle_symbols()
print(f"{symbols['count']} symbols available")
print(symbols['symbols'])  # ['AAVE', 'ACE', 'ADA', 'APT', 'ARB', ...]

Categories:

  • Major: BTC, ETH, SOL, XRP, DOGE, LTC, BCH, ADA, DOT, LINK, AVAX, BNB, TRX, XMR, XLM
  • DeFi: AAVE, UNI, CRV, LDO, PENDLE, JUP, MORPHO, ONDO, ENA
  • L2/Alt L1: ARB, OP, SUI, SEI, APT, NEAR, TON, ICP, TIA, STRK, MOVE, BERA, HBAR, MNT
  • Memes: HYPE, FARTCOIN, PUMP, WIF, POPCAT, PENGU, kPEPE, kBONK, kSHIB, TRUMP

Tick Data API

Get raw price ticks for any of 80 symbols:

# FARTCOIN ticks for last 10 minutes
ticks = api.get_ticks("FARTCOIN", duration="10m")
print(f"{ticks['tick_count']} ticks, latest: ${ticks['latest_price']}")

# TRUMP ticks for last hour
ticks = api.get_ticks("TRUMP", duration="1h")

# Custom time range (Unix ms)
ticks = api.get_ticks("DOGE", start_time=1768400000000, end_time=1768486000000)

Parameters:

Param Default Description
duration 1h Time window: 10m, 1h, 4h, 24h, 7d
limit 10000 Max ticks to return
startTime - Start time (Unix ms)
endTime - End time (Unix ms)

Candles API

Get OHLCV candles for any of 80 tracked symbols:

# BTC 5-minute candles
candles = api.get_candles("BTC", interval="5m")

# FARTCOIN 1-minute candles
candles = api.get_candles("FARTCOIN", interval="1m")

# TRUMP hourly candles
candles = api.get_candles("TRUMP", interval="1h")

# Custom time range
candles = api.get_candles("DOGE", interval="15m", start_time=0)  # All available

Parameters:

Param Default Description
interval 5m Candle size: 1m, 5m, 15m, 1h, 4h, 1d
startTime auto Start timestamp (Unix ms)
endTime now End timestamp (Unix ms)

Response Format (Hyperliquid-compatible):

{
  "t": 1736121600000,  // Open time (ms)
  "T": 1736125199999,  // Close time (ms)
  "s": "FARTCOIN",     // Symbol
  "i": "5m",           // Interval
  "o": "0.385",        // Open
  "h": "0.390",        // High
  "l": "0.380",        // Low
  "c": "0.387",        // Close
  "v": "0",            // Volume
  "n": 45              // Number of ticks
}

Python Usage

from api import MoonDevAPI

api = MoonDevAPI()

# All 224 prices at once
prices = api.get_prices()
print(f"BTC: ${prices['prices']['BTC']}")

# Quick single price
btc = api.get_price("BTC")
print(f"Spread: {btc['spread_bps']} bps")

# Full orderbook
book = api.get_orderbook("BTC")
print(f"Best bid: {book['best_bid']}, Best ask: {book['best_ask']}")

# Any wallet's account
account = api.get_account("0x...")
print(f"Account value: ${account['marginSummary']['accountValue']}")

# Trade fills
fills = api.get_fills("0x...", limit=100)
for fill in fills[:5]:
    print(f"{fill['coin']} {fill['side']} @ {fill['px']}")

# OHLCV candles
candles = api.get_candles("BTC", interval="1m")
for c in candles[-5:]:
    print(f"O:{c['o']} H:{c['h']} L:{c['l']} C:{c['c']}")

AI Swarm Agent (Supplementary Tool)

Optional: Get analysis from 6+ AI models simultaneously.

The main feature of this repo is the data layer API itself - the examples above show you how to access institutional-grade data. This AI Swarm Agent is a supplementary tool to help you understand and explore what's available.

This repo includes an AI swarm agent that can:

  • Chat with a Director AI that understands all 40+ API endpoints
  • Propose analysis plans using the available data
  • Execute multi-model analysis via OpenRouter (Claude, GPT, Gemini, Qwen, and more)

Quick Start

# Add to your .env (one key for everything!):
OPENROUTER_API_KEY=your_openrouter_key_here

# Install dependencies
pip install -r requirements.txt

# Run it!
python ai_agents/run.py

Example Session

πŸŒ™ Moon Dev's Director Agent
==================================================

> What can I do with these APIs?

You can analyze Hyperliquid data including:
- Real-time liquidations from 4 exchanges
- 148 symbols with whale positions
- HLP sentiment (THE BIG ONE) - retail positioning signals
- Smart money vs dumb money rankings
- Order flow and trade data
...

> Is there a short squeeze brewing on BTC?

[PLAN]
1. get_hlp_sentiment() - Check retail positioning
2. get_liquidations("24h") - Recent liquidation pressure
3. get_smart_money_signals("1h") - Smart money activity

πŸ“‹ Proceed with this plan? [y/n] > y

πŸ“‘ Fetching data from Moon Dev API...
   βœ… get_hlp_sentiment()
   βœ… get_liquidations("24h")
   βœ… get_smart_money_signals("1h")

🌊 Sending to AI Swarm for analysis...
   βœ… Claude Opus 4.5
   βœ… GPT-5 Mini
   βœ… Qwen3 Max
   βœ… GLM 4.6
   βœ… Gemini 2.5 Flash
   βœ… DeepSeek R1

============================================================
πŸ€– AI SWARM RESPONSES
============================================================

πŸ’‘ Claude Opus 4.5:
Based on the HLP z-score of +2.3, retail is heavily short. Combined with
$45M in short liquidations over 24h, there's building squeeze pressure...

πŸ’‘ GPT-5 Mini:
The sentiment data shows extreme short positioning. Smart money signals
are net bullish. Classic squeeze setup forming...

πŸ’‘ Qwen3 Max:
Cross-referencing HLP delta with liquidation data suggests accumulation
by market makers while retail is betting against the trend...

[More AI responses...]

============================================================
πŸŒ™ Analysis complete! - Moon Dev

Why This Matters

You now have:

  • Institutional-grade data from the Hyperliquid Data Layer
  • Multi-perspective AI analysis from 6+ different models
  • One simple interface to explore and analyze everything

This is institutional-grade alpha. The data costs hedge funds thousands per month. The AI swarm gives you perspectives from the best models in the world. And it's all available right here.


The Vision

Hyperliquid is building the housecoin of all finance.

I'm building the data layer that will help developers create the thousands of apps needed to onboard billions of users.

This isn't just about trading. This is about rebuilding finance. Transparent. Open. Fair.

Wall Street had their turn. Now it's ours.


Links


Built with love by Moon Dev

The housecoin of all finance starts here.

About

The data layer for hyperliquid so we can onboard billions or normies with millions of apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages