| name | open-broker |
| description | Hyperliquid trading toolkit. Execute market orders, limit orders, check positions, view funding rates, and analyze markets. Use for any Hyperliquid perp trading task. |
| license | MIT |
| compatibility | Requires Node.js 22+, network access to api.hyperliquid.xyz |
| metadata | {"author":"monemetrics","version":"1.0.3"} |
| allowed-tools | Bash(npx:*) Bash(tsx:*) Bash(npm:*) Read |
Open Broker - Hyperliquid Trading Skill
Execute trading operations on Hyperliquid DEX with builder fee support.
Quick Start (Automated Onboarding)
Run these two commands to get started:
npm install
npx tsx scripts/setup/onboard.ts
This will automatically:
- Generate a new trading wallet
- Create
.env with your private key
- Approve the builder fee (free, no funds needed)
- Display your wallet address to fund
After onboarding, fund your wallet:
- Send USDC to your wallet address on Arbitrum
- Deposit to Hyperliquid at https://app.hyperliquid.xyz/
- Start trading!
Manual Setup (Alternative)
If you prefer manual setup or have an existing wallet:
- Install dependencies:
npm install
- Copy and configure environment:
cp config/example.env .env
- Approve builder fee:
npx tsx scripts/setup/approve-builder.ts
Builder Fee
Open Broker charges a 1 bps (0.01%) builder fee on trades to fund development.
The onboarding script handles this automatically. To check or manage manually:
npx tsx scripts/setup/approve-builder.ts --check
npx tsx scripts/setup/approve-builder.ts
Quick Reference
Get Account Info
npx tsx scripts/info/account.ts
npx tsx scripts/info/account.ts --orders
Get Positions
npx tsx scripts/info/positions.ts
npx tsx scripts/info/positions.ts --coin ETH
Check Funding Rates
npx tsx scripts/info/funding.ts --top 20
npx tsx scripts/info/funding.ts --coin ETH
View Markets
npx tsx scripts/info/markets.ts --top 30
npx tsx scripts/info/markets.ts --coin BTC
All Markets (Perps + Spot + HIP-3)
npx tsx scripts/info/all-markets.ts
npx tsx scripts/info/all-markets.ts --type perp
npx tsx scripts/info/all-markets.ts --type hip3
npx tsx scripts/info/all-markets.ts --type spot
npx tsx scripts/info/all-markets.ts --top 20
Search Markets (Find assets across providers)
npx tsx scripts/info/search-markets.ts --query GOLD
npx tsx scripts/info/search-markets.ts --query BTC
npx tsx scripts/info/search-markets.ts --query ETH --type perp
Spot Markets
npx tsx scripts/info/spot.ts
npx tsx scripts/info/spot.ts --coin PURR
npx tsx scripts/info/spot.ts --balances
npx tsx scripts/info/spot.ts --top 20
Market Order
npx tsx scripts/operations/market-order.ts --coin ETH --side buy --size 0.1
npx tsx scripts/operations/market-order.ts --coin BTC --side sell --size 0.01 --slippage 100
Limit Order
npx tsx scripts/operations/limit-order.ts --coin ETH --side buy --size 1 --price 3000
npx tsx scripts/operations/limit-order.ts --coin SOL --side sell --size 10 --price 200 --tif ALO
Set TP/SL on Existing Position
npx tsx scripts/operations/set-tpsl.ts --coin HYPE --tp 40 --sl 30
npx tsx scripts/operations/set-tpsl.ts --coin HYPE --tp +10% --sl entry
npx tsx scripts/operations/set-tpsl.ts --coin ETH --sl -5%
npx tsx scripts/operations/set-tpsl.ts --coin ETH --tp 4000 --sl 3500 --size 0.5
Trigger Order (Standalone TP/SL)
npx tsx scripts/operations/trigger-order.ts --coin HYPE --side sell --size 0.5 --trigger 40 --type tp
npx tsx scripts/operations/trigger-order.ts --coin HYPE --side sell --size 0.5 --trigger 30 --type sl
Cancel Orders
npx tsx scripts/operations/cancel.ts --all
npx tsx scripts/operations/cancel.ts --coin ETH
npx tsx scripts/operations/cancel.ts --oid 123456
TWAP (Time-Weighted Average Price)
npx tsx scripts/operations/twap.ts --coin ETH --side buy --size 1 --duration 3600
npx tsx scripts/operations/twap.ts --coin BTC --side sell --size 0.5 --duration 1800 --intervals 6 --randomize 20
Scale In/Out (Grid Orders)
npx tsx scripts/operations/scale.ts --coin ETH --side buy --size 1 --levels 5 --range 2
npx tsx scripts/operations/scale.ts --coin BTC --side sell --size 0.5 --levels 4 --range 3 --distribution exponential --reduce
Bracket Order (Entry + TP + SL)
npx tsx scripts/operations/bracket.ts --coin ETH --side buy --size 0.5 --tp 3 --sl 1.5
npx tsx scripts/operations/bracket.ts --coin BTC --side sell --size 0.1 --entry limit --price 100000 --tp 5 --sl 2
Chase Order (Follow Price)
npx tsx scripts/operations/chase.ts --coin ETH --side buy --size 0.5 --timeout 300
npx tsx scripts/operations/chase.ts --coin SOL --side buy --size 10 --offset 2 --timeout 60
Trading Strategies
Funding Arbitrage
npx tsx scripts/strategies/funding-arb.ts --coin ETH --size 5000 --min-funding 25
npx tsx scripts/strategies/funding-arb.ts --coin BTC --size 10000 --duration 24 --check 30 --dry
Grid Trading
npx tsx scripts/strategies/grid.ts --coin ETH --lower 3000 --upper 4000 --grids 10 --size 0.1
npx tsx scripts/strategies/grid.ts --coin BTC --lower 90000 --upper 100000 --grids 5 --size 0.01 --mode long
DCA (Dollar Cost Averaging)
npx tsx scripts/strategies/dca.ts --coin ETH --amount 100 --interval 1h --count 24
npx tsx scripts/strategies/dca.ts --coin BTC --total 5000 --interval 1d --count 30
Market Making Spread
npx tsx scripts/strategies/mm-spread.ts --coin ETH --size 0.1 --spread 10
npx tsx scripts/strategies/mm-spread.ts --coin BTC --size 0.01 --spread 5 --max-position 0.1
Maker-Only MM (ALO orders)
npx tsx scripts/strategies/mm-maker.ts --coin HYPE --size 1 --offset 1
npx tsx scripts/strategies/mm-maker.ts --coin ETH --size 0.1 --offset 2 --max-position 0.5
Order Types
Limit Orders vs Trigger Orders
Limit Orders (limit-order.ts):
- Execute immediately if price is met
- Rest on the order book until filled or cancelled
- A limit sell BELOW current price fills immediately (taker)
- NOT suitable for stop losses
Trigger Orders (trigger-order.ts, set-tpsl.ts):
- Stay dormant until trigger price is reached
- Only activate when price hits the trigger level
- Proper way to set stop losses and take profits
- Won't fill prematurely
When to Use Each
| Scenario | Use |
|---|
| Buy at specific price below market | Limit order |
| Sell at specific price above market | Limit order |
| Stop loss (exit if price drops) | Trigger order (SL) |
| Take profit (exit at target) | Trigger order (TP) |
| Add TP/SL to existing position | set-tpsl.ts |
Script Arguments
All scripts support --dry for dry run (preview without executing).
Common Arguments
--coin - Asset symbol (ETH, BTC, SOL, etc.)
--dry - Dry run mode
Order Arguments
--side - buy or sell
--size - Order size in base asset
--price - Limit price (for limit orders)
--trigger - Trigger price (for trigger orders)
--type - Trigger type: tp (take profit) or sl (stop loss)
--slippage - Slippage tolerance in bps (for market orders)
--tif - Time in force: GTC, IOC, ALO
--reduce - Reduce-only order
TP/SL Price Formats
--tp 40 - Absolute price ($40)
--tp +10% - 10% above entry price
--sl -5% - 5% below entry price
--sl entry - Stop at entry (breakeven)
References
See references/OPERATIONS.md for detailed operation documentation.
See references/STRATEGIES.md for detailed strategy documentation.
Risk Warning
- Always use
--dry first to preview orders
- Start with small sizes on testnet
- Monitor positions and liquidation prices
- Use reduce-only for closing positions