Advanced Execution

TWAP

Place a native Hyperliquid TWAP order. The exchange handles order slicing and execution timing server-side — the command returns immediately with a TWAP ID you can use to check status or cancel.

NOTE: Minimum TWAP order notional size has to be at least 300 USDC

# Buy 1 HYPE over 30 minutes
openbroker twap --coin HYPE --side buy --size 1 --duration 30
 
# Sell 0.5 BTC over 2 hours without randomized timing
openbroker twap --coin BTC --side sell --size 0.5 --duration 120 --randomize false
 
# Preview order details
openbroker twap --coin HYPE --side buy --size 2 --duration 60 --dry
FlagDescriptionDefault
--coinAsset to traderequired
--sidebuy or sellrequired
--sizeTotal order size in base assetrequired
--durationDuration in minutes (5–1440, i.e. 5 min to 24 hours)required
--randomizeRandomize execution timing (use --randomize false to disable)true
--reduce-onlyReduce-only order
--leverageSet leverage before placing
--dryShow order details without placing
--verboseShow debug output

TWAP Cancel

Cancel a running native TWAP order by its TWAP ID.

openbroker twap-cancel --coin ETH --twap-id 77738308
FlagDescriptionDefault
--coinAsset symbolrequired
--twap-idTWAP order ID to cancelrequired
--verboseShow debug output

TWAP Status

View TWAP order history and currently running TWAP orders. Shows execution progress, average fill price, and notional value.

# All TWAP history
openbroker twap-status
 
# Only active/running TWAPs
openbroker twap-status --active
FlagDescriptionDefault
--activeShow only active/running TWAP orders
--verboseShow debug output

Scale

Place a grid of limit orders to scale into or out of a position. Supports three size distribution modes for different strategies.

# Scale into 1 HYPE with 5 buy orders spread 2% below mid
openbroker scale --coin HYPE --side buy --size 1 --levels 5 --range 2
 
# Scale out with exponential distribution (more size at better prices)
openbroker scale --coin HYPE --side buy --size 2 --levels 8 --range 5 --distribution exponential
 
# Scale out of BTC position (reduce-only)
openbroker scale --coin BTC --side sell --size 0.5 --levels 4 --range 3 --reduce
FlagDescriptionDefault
--coinAsset to traderequired
--sidebuy or sellrequired
--sizeTotal order size in base assetrequired
--levelsNumber of price levels (orders)required
--rangePrice range from current mid in %required
--distributionSize distribution: linear (more at better prices), exponential (much more at better prices), or flat (equal)linear
--tifTime in force: GTC or ALOGTC
--reduceReduce-only orders (for scaling out)false
--dryShow order grid without placing
--verboseShow debug output

Bracket

Complete trade setup in one command: entry order with automatic take-profit and stop-loss. Supports market or limit entry.

# Long ETH with 3% TP and 1.5% SL (market entry)
openbroker bracket --coin ETH --side buy --size 0.5 --tp 3 --sl 1.5
 
# Short BTC with limit entry at $100k, 5% TP, 2% SL
openbroker bracket --coin BTC --side sell --size 0.1 --entry limit --price 100000 --tp 5 --sl 2
 
# Preview bracket setup
openbroker bracket --coin SOL --side buy --size 10 --tp 5 --sl 2 --dry
FlagDescriptionDefault
--coinAsset to traderequired
--sideEntry direction: buy (long) or sell (short)required
--sizePosition size in base assetrequired
--tpTake profit distance in % from entryrequired
--slStop loss distance in % from entryrequired
--entryEntry type: market or limitmarket
--priceEntry price (required if --entry limit)
--slippageSlippage for market entry in bps50
--leverageSet leverage before entry
--dryShow bracket plan without executing
--verboseShow debug output

Shows risk/reward ratio, potential profit/loss, and executes in 3 steps: entry → TP trigger → SL trigger. TP and SL are placed as trigger orders that only execute when price reaches the target.

Chase

Follow the price with ALO (post-only) limit orders to get maker fills and avoid taker fees. Continuously adjusts the order to stay near the best price.

# Chase buy 0.5 ETH (default: 5 bps offset, 5 min timeout)
openbroker chase --coin ETH --side buy --size 0.5
 
# Aggressive chase: tighter offset, short timeout, strict max chase
openbroker chase --coin SOL --side buy --size 10 --offset 1 --timeout 60 --max-chase 50
 
# Wider offset, longer timeout
openbroker chase --coin BTC --side sell --size 0.1 --offset 2 --timeout 600
FlagDescriptionDefault
--coinAsset to traderequired
--sidebuy or sellrequired
--sizeOrder size in base assetrequired
--offsetOffset from mid price in bps5 (0.05%)
--timeoutMax time to chase in seconds300 (5 min)
--intervalPrice check / order update interval in ms2000
--max-chaseMax price to chase to in bps from start price100 (1%)
--leverageSet leverage before chasing
--reduceReduce-only order
--dryShow chase parameters without executing
--verboseShow debug output

Uses ALO orders exclusively, guaranteeing maker rebates. Cancels and replaces the order each time price moves, and stops when filled, timed out, or max chase distance is reached.