Hyperliquid 히트맵
Quicknode gRPC streams 실시간 매수/매도 호가를 기준으로, 대기 중인 Hyperliquid 트리거 주문을 가격대 clusters 형태로 시각화하는 실시간 브라우저 대시보드입니다.

개요
This app connects to Quicknode's Hyperliquid gRPC endpoint to stream live TP/SL trigger order events (StreamTpslUpdates) and best bid/offer prices (StreamBboBook). Open orders are clustered into configurable price buckets and pushed to the browser over WebSocket, where a canvas-based heatmap renders the aggregated trigger pressure at each price level in real time.
The app ships with a built-in demo mode that uses a synthetic feed, so you can explore the UI without any credentials.
This example app is provided for educational and demonstration purposes only.
건축
Browser (React + Canvas)
▲
│ WebSocket
│
Node.js HTTP + WebSocket Server
│
├── gRPC: StreamTpslUpdates ──┐
│ ├── Quicknode Hyperliquid gRPC Endpoint
└── gRPC: StreamBboBook ──────┘
주요 기능
- Real-time TP/SL heatmap: price-bucket clusters updated live from Quicknode gRPC streams
- BBO anchor: current bid and ask prices overlaid on the heatmap for market context
- TP/SL mix indicator: each bucket shows a small green/red marker for take-profit vs. stop-loss share
- Multi-asset support: monitor BTC, ETH, SOL, HYPE, and any other Hyperliquid perp symbol simultaneously
- Configurable bucket width:
BUCKET_SIZE_PCTscales bucket size relative to the current mid price - Demo mode: runs with a synthetic feed when credentials are missing or
DEMO_MODE=true - Health endpoint:
GET /healthreturns server status and current run mode as JSON
선행 조건
- Quicknode account with a Hyperliquid endpoint (gRPC access required)
- Node.js v18+
- pnpm
프로젝트 구조
proto/
orderbook.proto # gRPC service definition
src/
client/
App.tsx # Coin selector and WebSocket client
HeatmapCanvas.tsx # Canvas-based heatmap renderer
main.tsx # React entry point
styles.css # App styles
server/
cluster-store.ts # Order clustering and BBO state
config.ts # Env var loading
demo.ts # Synthetic demo feed
grpc.ts # gRPC client setup
server.ts # HTTP + WebSocket server
streams.ts # Live gRPC stream connections
shared/
types.ts # Shared TypeScript types
Environment Variables
복사 .env.example ~에 .env and fill in your credentials:
# https://your-endpoint.hype-mainnet.quiknode.pro:10000
QUICKNODE_GRPC_ENDPOINT=your-endpoint.hype-mainnet.quiknode.pro:10000
QUICKNODE_GRPC_TOKEN=your-auth-token
TARGET_COINS=BTC,ETH,SOL
DEFAULT_COIN=BTC
BUCKET_SIZE_PCT=0.75
DEMO_MODE=false
PORT=8787
| Variable | 설명 |
|---|---|
QUICKNODE_GRPC_ENDPOINT | Your Quicknode Hyperliquid gRPC endpoint (host:port) |
QUICKNODE_GRPC_TOKEN | Auth token for the gRPC endpoint |
TARGET_COINS | Comma-separated list of Hyperliquid perp symbols to monitor |
DEFAULT_COIN | Which coin to display on load (must be in TARGET_COINS) |
BUCKET_SIZE_PCT | Bucket width as a percentage of mid price (e.g., 0.75 = ~$500 buckets on BTC near $64k) |
DEMO_MODE | Set to true to force demo mode regardless of credentials |
PORT | HTTP server port (default: 8787) |
시작하기
1. 저장소를 복제하세요
git clone https://github.com/quiknode-labs/qn-guide-examples.git
cd qn-guide-examples/sample-dapps/hyperliquid-tpsl-heatmap
2. 종속성 설치
pnpm install
3. Configure environment
cp .env.example .env
열기 .env and set QUICKNODE_GRPC_ENDPOINT 그리고 QUICKNODE_GRPC_TOKEN with your Quicknode Hyperliquid endpoint credentials. Omitting them will start the app in demo mode automatically.
4. Start the app
pnpm dev
Open http://localhost:8787 in your browser.
미리 보기

- 저장소를 포크하기
- 기능 브랜치 생성:git checkout -b feature/amazing-feature
- 변경 사항을 커밋하세요:git commit -m "멋진 기능 추가"
- 브랜치를 푸시하세요:git push origin feature/amazing-feature
- 풀 리퀘스트를 제출하세요.
