Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Hyperliquid copy trading bot

Mirror a leader’s perp fills on Hyperliquid with proportional sizing—built for traders who want execution without babysitting a browser.

Pulse Mirror watches your chosen wallet over WebSocket, scales each leg against your equity vs theirs, applies notional caps and minimum ticket checks, then fires HL-compliant limit orders using the official SDK patterns (asset IDs, tick/lot formatting).

Trading perpetuals can wipe an account. Run TESTNET=true and DRY_RUN=true until you trust sizing and symbols.


Why traders use this

BenefitWhat it means
Fill-tied logicReacts to leader executions, not stale snapshots
Equity-aware sizingScales size by (your NAV / leader NAV) × SCALE, capped by CAP_PCT_EQUITY
Exchange-realistic formattingUses HL size/price rules via @nktkas/hyperliquid helpers
Operational clarityLogs flow through ts-logger-pack so you can swap to structured sinks later

Requirements

  • Node.js 20+
  • A Hyperliquid API wallet (PRIVATE_KEY) with margin on mainnet or testnet
  • The leader address (TARGET_LEADER) you want to follow

Setup

npm install cp .env.example .env # Edit .env — never commit real keys npm run dev

Production-style:

npm run build node dist/main.js

Environment

VariableRequiredDescription
PRIVATE_KEYyesBot wallet private key (0x-prefixed or plain hex)
TARGET_LEADERyesLeader wallet (0x address)
TESTNETnotrue / false — default false
SCALEnoExtra multiplier on sized qty — default 1
MAX_LEVnoHard cap on leverage mirrored — default 20
MIN_USDnoSkip mirrors below this notional — default 10
BLOCKLISTnoComma-separated coins to ignore (e.g. DOGE,PEPE)
DRY_RUNnoLog only — default false
CAP_PCT_EQUITYnoMax % of your equity allowed as notional per slice — default 40

Architecture (mental model)

  1. Tap — WebSocket userFills on the leader.
  2. Normalize — Dedupe by fill hash; classify open / reduce / close from HL dir.
  3. Size — Equity ratio × SCALE, min-notional guard, per-leg notional cap.
  4. ExecuteupdateLeverage when needed, then nested order with GTC limits.

Logging implements the Logger shape from ts-logger-pack (console backend today).


Disclaimer

This software is provided as-is for experimentation. You alone control leverage, margin mode, and capital at risk. No performance or profitability claims are made.

关于 About

hyperliquid copy trading bot to mirror leader's perp fill hyperliquid copy trading bot hyperliquid copy trading bot hyperliquid copy trading bot
copy-trading-bothyperliquid-copy-traderhyperliquid-dexhyperliquid-perp-dexperpetual-exchangeperpetual-futures

语言 Languages

TypeScript94.9%
JavaScript5.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
6
Total Commits
峰值: 6次/周
Less
More

核心贡献者 Contributors