Runtime: Node.js ≥20.19. SDK: @nktkas/hyperliquid, wallet: viem, config: js-yaml, logs: pino.
bots/*.yaml # active, exchange, grid, risk_management
src/runBot.ts # CLI: validate | run
src/core/ # engine, config loader, keys, risk
src/exchanges/ # HL adapter + WS allMids
src/strategies/grid/ # basic grid
| Variable | Scope |
|---|---|
HYPERLIQUID_TESTNET_PRIVATE_KEY |
testnet 0x… |
HYPERLIQUID_MAINNET_PRIVATE_KEY |
mainnet |
HYPERLIQUID_PRIVATE_KEY |
legacy fallback |
HYPERLIQUID_TESTNET |
override YAML exchange.testnet |
active: true— auto-select when no path argexchange.type:hyperliquid|hlaccount.max_allocation_pct— sizestotal_allocationvs notional 10_000 USD basegrid.levels,grid.symbol,price_range.auto.range_pctrisk_management— drawdown, position %, rebalance threshold, optional SL/TPmonitoring.log_level— DEBUG | INFO | WARNING | ERROR
npm run validate
npx tsx src/runBot.ts --validate bots/btc_conservative.yaml
npx tsx src/runBot.ts bots/btc_conservative.yaml
npm run typecheckSIGINT → cancel open orders; positions not flattened automatically.
Testnet before mainnet. Keys outside repo. Authors not liable for trading losses.