hl-cli

Stop clicking. Start executing.

What it is

A command-line trading interface for Hyperliquid perpetual futures. Built for traders who want speed, precision, and lower fees.

Why hl-cli

Typing is faster than clicking through UI menus. hl-cli lets you place, modify, and manage orders in seconds — no tabs, no sliders, no confirmation dialogs. Every order type is a single command with full control over price, size, and execution. Build strategies the Hyperliquid UI doesn't support: scaled entries across a price range, trailing limits that keep you at the top of the book, chained sequences that set stops and take-profits the moment you're filled. The precision also means more of your orders can be placed as limit orders instead of market orders — keeping you on the maker side of the fee structure. Save your setups as shortcuts and execute them with one keystroke.

Features

Chase Orders

Trailing limit orders that follow the bid/ask. Places at the front of the book and continuously adjusts as the market moves. You get filled at maker fees instead of crossing the spread.

Split Orders

Distribute orders across a price range. Scale into positions or set layered take-profits. Supports linear weighting (scale 1 to 3) for bottom-heavy or top-heavy fills.

Variables & Expressions

Use lastprice, bidprice, askprice, mark, possize, margin, entry in your commands. Math works too: @lastprice-50, @entry+2%, 100%margin.

Command Chaining

Execute sequences: chase buy 0.1, wait pos, stop 90000, tp 110000. Use comma for serial, semicolon for parallel execution.

Shortcuts

Bind complex commands to single keys. shortcut q split buy 44%margin from bidprice to bidprice-0.5%. Saved across sessions in startup.txt.

Reprice

Shift all resting orders by percentage. bump +0.5% moves bids up and asks down. Keep your orders competitive without manual repricing.

Maker-first by default

All limit orders default to post-only (ALO) — you always pay maker fees instead of taker. On Hyperliquid, that's 0.015% vs 0.045%. Taker fees are 3x higher.

Monthly Volume Taker Fees (0.045%) Maker Fees (0.015%) You Save
$100,000 $45 $15 $30/mo
$500,000 $225 $75 $150/mo
$1,000,000 $450 $150 $300/mo

At higher volume tiers, maker fees drop to 0%. Taker fees remain 0.045% until $1B+.

Example Commands

Basic orders

BTC> buy 0.01 # market buy BTC> buy $500 # buy $500 worth at market BTC> sell 0.01 @105000 # limit sell at $105k BTC> buy 0.01 @lastprice-50 # limit buy $50 below current

Position management

BTC> stop 95000 # stop loss at $95k BTC> tp 110000 # take profit at $110k BTC> close # close entire position BTC> close 50% # close half

Chase orders

BTC> chase buy 0.1 # chase at best bid (maker fees) BTC> chase sell $500 # chase $500 worth at best ask

Split orders

# Scale entry: buy across 2% range below market BTC> split buy 100%margin from bidprice to bidprice-2% # Scale TP: sell position across 3% range (reduce-only) BTC> split sell 100%possize from entry to entry+3% ro # Weighted: more size at bottom (scale 1 to 3) BTC> split buy 44%margin from bidprice to bidprice-1% scale 1 to 3

Chaining

# Entry + stops in sequence BTC> chase buy 0.1, wait pos, stop 90000, tp 110000 # Stop and TP in parallel BTC> buy 0.1 @95000, wait pos, stop 90000; tp 110000

Shortcuts

# Bind strategies to single keys BTC> sc q split buy 44%margin from bidprice-0.01% to bidprice-0.45% scale 1 to 3 BTC> sc tpb split sell 80%possize from askprice+0.04% to askprice+0.16% ro # Now just type: BTC> q # scale-in at bid BTC> tpb # TP ladder for longs

How It Works

Download

Get the CLI and install dependencies.

pip install hyperliquid-python-sdk prompt_toolkit eth-account

Configure

Add your Hyperliquid wallet address and private key to config.json.

{ "account_address": "0xYour...", "secret_key": "0xYour...", "network": "mainnet" }

Trade

Run the CLI and start executing.

python main.py BTC> buy 0.01

Requirements

Runtime
Python 3.10+
Exchange
Hyperliquid account
Auth
Wallet private key
OS
Windows / Mac / Linux

FAQ

Is my private key safe?
Your key stays on your machine. It's only used locally to sign transactions — it's never sent anywhere except to Hyperliquid's API as signed messages. Same as the official SDK.
Can I use this with an API wallet?
Use your main Hyperliquid wallet address, not an API wallet. The account_address should be your main wallet; the private key can be from an API wallet if you've set one up, but the address must be the main one.
What happens if my order gets rejected?
ALO (post-only) orders are rejected if they would cross the spread. This is by design — it ensures you're paying maker fees, not taker. Market orders and immediate-or-cancel orders still work normally for when you need the certainty of an instant fill.
Can I test without real money?
Yes. Run with --testnet to use Hyperliquid's testnet. You need a wallet that has deposited on mainnet before — register on testnet.hyperliquid.xyz with that wallet, claim test funds, then trade with fake money.

Pricing

$10/month
Beta pricing. Subject to change.
Join Waitlist

Contact

X: @hlclixyz
Email: [email protected]