explaingit

fristork/hyperliquid-trading-bot

Analysis updated 2026-05-18

78TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A TypeScript bot that automates grid trading on the Hyperliquid crypto exchange, placing buy and sell orders at set price levels.

Mindmap

mindmap
  root((repo))
    What it does
      Grid trading strategy
      Automated buy sell orders
      Risk management
    Tech stack
      TypeScript
      Node.js
      WebSocket
    Use cases
      Automate crypto trading
      Test on testnet
      Configure risk rules
    Audience
      Developers
      Crypto traders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automate grid trading strategies on the Hyperliquid exchange without manual order placement.

USE CASE 2

Test trading strategies safely on Hyperliquid testnet before using real funds.

USE CASE 3

Configure custom risk rules like max drawdown and stop-loss for automated trading.

What is it built with?

TypeScriptNode.js@nktkas/hyperliquidviempino

How does it compare?

fristork/hyperliquid-trading-botadrienckr/notslopalchemz/solana-pumpfun-token-bundler
Stars787878
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyhard
Complexity3/52/54/5
Audiencedeveloperwriterdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Node.js 20.19+ and a Hyperliquid private key set via environment variables.

In plain English

This is a grid trading bot for Hyperliquid, a decentralized perpetual futures exchange, written in TypeScript and running on Node.js 20.19 or newer. A grid trading strategy works by placing a ladder of buy and sell limit orders at evenly-spaced price levels around the current market price. When the price dips, buy orders fill, when it rises, sell orders fill. The bot automatically maintains this grid, profiting from price oscillation without needing to predict direction. This bot implements that strategy with geometric price levels (spacing that grows proportionally with price rather than staying fixed), and can optionally rebalance the grid when price drifts too far. You configure the bot through YAML files in a bots directory: which trading pair to trade, how many grid levels to create, what price range to cover, and risk limits such as maximum drawdown, maximum position size as a percentage of your account, and optional stop-loss and take-profit thresholds. The bot connects to Hyperliquid's official API using WebSocket for live mid-price feeds and the exchange API for placing and canceling limit orders. Both a testnet and mainnet environment are supported, and the README strongly recommends testing on testnet first. Built on the @nktkas/hyperliquid SDK, viem for wallet handling, and pino for structured logging.

Copy-paste prompts

Prompt 1
Help me write a YAML config file for this Hyperliquid grid trading bot with custom price levels and risk limits.
Prompt 2
Explain how the geometric grid spacing in this bot decides where to place buy and sell orders.
Prompt 3
Walk me through setting up environment variables to safely connect this bot to Hyperliquid testnet.
Prompt 4
Show me how the rebalance logic in this bot shifts the grid when price drifts.

Frequently asked questions

What is hyperliquid-trading-bot?

A TypeScript bot that automates grid trading on the Hyperliquid crypto exchange, placing buy and sell orders at set price levels.

What language is hyperliquid-trading-bot written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, @nktkas/hyperliquid.

How hard is hyperliquid-trading-bot to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is hyperliquid-trading-bot for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.