openbroker 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +445 -39
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  All notable changes to Open Broker will be documented in this file.
4
4
 
5
+ ## [1.0.37] - 2025-02-08
6
+ - **Detailed Docs**: Adding detailed docs for all sub commands
7
+
5
8
  ## [1.0.36] - 2025-02-06
6
9
 
7
10
  ### Changed
package/README.md CHANGED
@@ -25,84 +25,482 @@ openbroker search --query GOLD # Find markets
25
25
  ## Commands
26
26
 
27
27
  ### Setup
28
+
28
29
  ```bash
29
30
  openbroker setup # One-command setup (wallet + config + builder approval)
30
31
  ```
31
32
 
32
33
  The setup command handles everything automatically:
33
34
  - Generates a new wallet or accepts your existing private key
34
- - Saves configuration to `~/.openbroker/.env`
35
+ - Saves configuration to `~/.openbroker/.env` (permissions `0600`)
35
36
  - Approves the builder fee (required for trading)
36
37
 
37
- ### Account Info
38
+ ---
39
+
40
+ ### Info Commands
41
+
42
+ #### `account` — View Account Info
43
+
44
+ Show balance, equity, margin, and positions summary.
45
+
46
+ ```bash
47
+ openbroker account # Balance, equity, margin, positions
48
+ openbroker account --orders # Also show open orders
49
+ ```
50
+
51
+ | Flag | Description | Default |
52
+ |------|-------------|---------|
53
+ | `--orders` | Include open orders in the output | — |
54
+
55
+ #### `positions` — View Positions
56
+
57
+ Detailed position view with entry/mark prices, PnL, leverage, liquidation distance, and margin used.
58
+
59
+ ```bash
60
+ openbroker positions # All open positions
61
+ openbroker positions --coin ETH # Single position detail
62
+ ```
63
+
64
+ | Flag | Description | Default |
65
+ |------|-------------|---------|
66
+ | `--coin` | Filter to a single asset | — |
67
+
68
+ #### `funding` — Funding Rates
69
+
70
+ View funding rates sorted by annualized rate. Highlights high-funding opportunities.
71
+
72
+ ```bash
73
+ openbroker funding # Top 20 by annualized rate
74
+ openbroker funding --top 50 # Top 50
75
+ openbroker funding --coin ETH # Single asset
76
+ openbroker funding --sort oi # Sort by open interest
77
+ ```
78
+
79
+ | Flag | Description | Default |
80
+ |------|-------------|---------|
81
+ | `--top` | Number of results to show | `20` |
82
+ | `--coin` | Filter to a single asset | — |
83
+ | `--sort` | Sort by: `annualized`, `hourly`, or `oi` | `annualized` |
84
+ | `--all` | Show all assets including low OI | — |
85
+
86
+ #### `markets` — Market Data
87
+
88
+ Market data for perpetuals. Pass `--coin` for a detailed single-asset view with oracle price, min size, and more.
89
+
90
+ ```bash
91
+ openbroker markets # Top 30 perps by volume
92
+ openbroker markets --coin ETH # Detailed view for ETH
93
+ openbroker markets --sort change --top 10 # Top movers
94
+ ```
95
+
96
+ | Flag | Description | Default |
97
+ |------|-------------|---------|
98
+ | `--coin` | Detailed view for a single asset | — |
99
+ | `--top` | Number of results | `30` |
100
+ | `--sort` | Sort by: `volume`, `oi`, or `change` | `volume` |
101
+
102
+ #### `all-markets` — All Markets
103
+
104
+ Browse all available markets across main perps, HIP-3 perps, and spot — grouped by type.
105
+
106
+ ```bash
107
+ openbroker all-markets # Everything
108
+ openbroker all-markets --type perp # Main perps only
109
+ openbroker all-markets --type hip3 # HIP-3 perps only
110
+ openbroker all-markets --type spot # Spot only
111
+ openbroker all-markets --top 20 # Top 20 by volume
112
+ ```
113
+
114
+ | Flag | Description | Default |
115
+ |------|-------------|---------|
116
+ | `--type` | Filter: `perp`, `spot`, `hip3`, or `all` | `all` |
117
+ | `--top` | Limit to top N by volume | — |
118
+ | `--verbose` | Show detailed output | — |
119
+
120
+ #### `search` — Search Markets
121
+
122
+ Search for assets by name across all providers (perps, HIP-3, spot). Shows funding comparison when an asset is listed on multiple venues.
123
+
124
+ ```bash
125
+ openbroker search --query GOLD # Find all GOLD markets
126
+ openbroker search --query ETH --type perp # ETH perps only
127
+ openbroker search --query PURR --type spot # PURR spot only
128
+ ```
129
+
130
+ | Flag | Description | Default |
131
+ |------|-------------|---------|
132
+ | `--query` | Search term (matches coin name) | **required** |
133
+ | `--type` | Filter: `perp`, `spot`, `hip3`, or `all` | `all` |
134
+ | `--verbose` | Show detailed output | — |
135
+
136
+ #### `spot` — Spot Markets & Balances
137
+
38
138
  ```bash
39
- openbroker account # Balance, equity, margin
40
- openbroker positions # Open positions with PnL
41
- openbroker funding --top 20 # Funding rates
42
- openbroker markets --coin ETH # Market data
43
- openbroker all-markets # All markets (perps, HIP-3, spot)
44
- openbroker search --query GOLD # Search across providers
45
- openbroker spot --balances # Spot balances
139
+ openbroker spot # All spot markets
140
+ openbroker spot --balances # Your spot token balances
141
+ openbroker spot --coin PURR # Filter by coin
142
+ openbroker spot --top 20 # Top 20 by volume
46
143
  ```
47
144
 
48
- ### Trading
145
+ | Flag | Description | Default |
146
+ |------|-------------|---------|
147
+ | `--balances` | Show your spot token balances instead of markets | — |
148
+ | `--coin` | Filter by coin symbol | — |
149
+ | `--top` | Limit to top N by volume | — |
150
+ | `--verbose` | Show token metadata | — |
151
+
152
+ ---
153
+
154
+ ### Trading Commands
155
+
156
+ #### `buy` / `sell` / `market` — Market Orders
157
+
158
+ Execute market orders with slippage protection. `buy` and `sell` are shortcuts that set `--side` automatically.
159
+
49
160
  ```bash
50
- # Market orders
51
161
  openbroker buy --coin ETH --size 0.1
52
162
  openbroker sell --coin BTC --size 0.01
163
+ openbroker buy --coin SOL --size 10 --slippage 100 --dry
164
+ openbroker buy --coin ETH --size 0.1 --verbose
165
+ ```
166
+
167
+ | Flag | Description | Default |
168
+ |------|-------------|---------|
169
+ | `--coin` | Asset to trade (ETH, BTC, SOL, HYPE, etc.) | **required** |
170
+ | `--side` | Order direction: `buy` or `sell` (auto-set by buy/sell command) | **required** |
171
+ | `--size` | Order size in base asset | **required** |
172
+ | `--slippage` | Slippage tolerance in bps (basis points) | `50` (0.5%) |
173
+ | `--reduce` | Reduce-only order (won't increase position) | `false` |
174
+ | `--dry` | Preview order details without executing | — |
175
+ | `--verbose` | Show full API request/response | — |
176
+
177
+ #### `limit` — Limit Orders
53
178
 
54
- # Limit orders
179
+ Place a limit order at a specific price. Supports three time-in-force modes.
180
+
181
+ ```bash
55
182
  openbroker limit --coin ETH --side buy --size 1 --price 3000
183
+ openbroker limit --coin BTC --side sell --size 0.1 --price 100000 --tif ALO
184
+ openbroker limit --coin SOL --side buy --size 10 --price 150 --reduce
185
+ ```
186
+
187
+ | Flag | Description | Default |
188
+ |------|-------------|---------|
189
+ | `--coin` | Asset to trade | **required** |
190
+ | `--side` | `buy` or `sell` | **required** |
191
+ | `--size` | Order size in base asset | **required** |
192
+ | `--price` | Limit price | **required** |
193
+ | `--tif` | Time in force: `GTC` (rest on book), `IOC` (fill or cancel), `ALO` (post-only, maker only) | `GTC` |
194
+ | `--reduce` | Reduce-only order | `false` |
195
+ | `--dry` | Preview without executing | — |
196
+
197
+ #### `trigger` — Trigger Orders (Conditional TP/SL)
198
+
199
+ Place conditional orders that activate when price reaches a trigger level. Used for stop losses, take profits, and conditional entries.
200
+
201
+ ```bash
202
+ # Take profit: sell HYPE when price rises to $40
203
+ openbroker trigger --coin HYPE --side sell --size 0.5 --trigger 40 --type tp
56
204
 
57
- # TP/SL on existing position
58
- openbroker tpsl --coin HYPE --tp 40 --sl 30
59
- openbroker tpsl --coin ETH --tp +10% --sl -5%
205
+ # Stop loss: sell HYPE when price drops to $30
206
+ openbroker trigger --coin HYPE --side sell --size 0.5 --trigger 30 --type sl
60
207
 
61
- # Cancel orders
62
- openbroker cancel --coin ETH # Cancel all ETH orders
63
- openbroker cancel --all # Cancel all orders
208
+ # Buy stop: buy BTC on breakout above $75k
209
+ openbroker trigger --coin BTC --side buy --size 0.01 --trigger 75000 --type sl --reduce false
64
210
  ```
65
211
 
212
+ | Flag | Description | Default |
213
+ |------|-------------|---------|
214
+ | `--coin` | Asset to trade | **required** |
215
+ | `--side` | Order side when triggered: `buy` or `sell` | **required** |
216
+ | `--size` | Order size in base asset | **required** |
217
+ | `--trigger` | Trigger price (order activates at this level) | **required** |
218
+ | `--type` | Order type: `tp` (take profit) or `sl` (stop loss) | **required** |
219
+ | `--limit` | Custom limit price when triggered (overrides auto-calculation) | auto |
220
+ | `--slippage` | Slippage for stop loss limit price in bps | `100` (1%) |
221
+ | `--reduce` | Reduce-only order | `true` |
222
+ | `--dry` | Preview without placing | — |
223
+ | `--verbose` | Show debug output | — |
224
+
225
+ **Trigger behavior:**
226
+ - TP: Limit price = trigger price (favorable fill)
227
+ - SL: Limit price = trigger ± slippage (ensures fill in fast markets)
228
+
229
+ #### `tpsl` — Set TP/SL on Existing Position
230
+
231
+ Attach take-profit and/or stop-loss trigger orders to an open position. Supports absolute prices, percentage offsets, and breakeven stops.
232
+
233
+ ```bash
234
+ openbroker tpsl --coin HYPE --tp 40 --sl 30 # Absolute prices
235
+ openbroker tpsl --coin ETH --tp +10% --sl -5% # Percentage from entry
236
+ openbroker tpsl --coin HYPE --tp +10% --sl entry # Breakeven stop
237
+ openbroker tpsl --coin ETH --sl -5% # Stop loss only
238
+ openbroker tpsl --coin ETH --tp 4000 --sl 3500 --size 0.5 # Partial position
239
+ ```
240
+
241
+ | Flag | Description | Default |
242
+ |------|-------------|---------|
243
+ | `--coin` | Asset with an open position | **required** |
244
+ | `--tp` | Take profit price: absolute (`40`), percentage (`+10%`), or `entry` | — |
245
+ | `--sl` | Stop loss price: absolute (`30`), percentage (`-5%`), or `entry` | — |
246
+ | `--size` | Size to protect (for partial TP/SL) | full position |
247
+ | `--sl-slippage` | Stop loss slippage buffer in bps | `100` (1%) |
248
+ | `--dry` | Preview orders without placing | — |
249
+ | `--verbose` | Show debug output | — |
250
+
251
+ Shows risk/reward ratio and potential profit/loss before placing.
252
+
253
+ #### `cancel` — Cancel Orders
254
+
255
+ ```bash
256
+ openbroker cancel --all # Cancel all open orders
257
+ openbroker cancel --coin ETH # Cancel all ETH orders
258
+ openbroker cancel --coin ETH --oid 123456 # Cancel specific order
259
+ openbroker cancel --all --dry # Preview what would be cancelled
260
+ ```
261
+
262
+ | Flag | Description | Default |
263
+ |------|-------------|---------|
264
+ | `--coin` | Cancel orders for a specific coin only | — |
265
+ | `--oid` | Cancel a specific order by ID | — |
266
+ | `--all` | Cancel all open orders | — |
267
+ | `--dry` | Show orders without cancelling | — |
268
+
269
+ ---
270
+
66
271
  ### Advanced Execution
272
+
273
+ #### `twap` — Time-Weighted Average Price
274
+
275
+ Split a large order into smaller slices executed at regular intervals to minimize market impact.
276
+
67
277
  ```bash
68
- # TWAP - split order over time
278
+ # Buy 1 ETH over 1 hour (auto ~12 slices)
69
279
  openbroker twap --coin ETH --side buy --size 1 --duration 3600
70
280
 
71
- # Scale - grid of limit orders
281
+ # Sell 0.5 BTC over 30 min, 6 slices, randomized timing
282
+ openbroker twap --coin BTC --side sell --size 0.5 --duration 1800 --intervals 6 --randomize 20
283
+ ```
284
+
285
+ | Flag | Description | Default |
286
+ |------|-------------|---------|
287
+ | `--coin` | Asset to trade | **required** |
288
+ | `--side` | `buy` or `sell` | **required** |
289
+ | `--size` | Total order size in base asset | **required** |
290
+ | `--duration` | Total execution time in seconds | **required** |
291
+ | `--intervals` | Number of slices | 1 per 5 min |
292
+ | `--randomize` | Randomize timing by ±X percent | `0` |
293
+ | `--slippage` | Slippage per slice in bps | `50` |
294
+ | `--dry` | Show execution plan without trading | — |
295
+ | `--verbose` | Show debug output | — |
296
+
297
+ Reports VWAP, actual slippage, fill rate, and total execution time.
298
+
299
+ #### `scale` — Scale In/Out
300
+
301
+ Place a grid of limit orders to scale into or out of a position. Three distribution modes control how size is allocated across price levels.
302
+
303
+ ```bash
72
304
  openbroker scale --coin ETH --side buy --size 1 --levels 5 --range 2
305
+ openbroker scale --coin ETH --side buy --size 2 --levels 8 --range 5 --distribution exponential
306
+ openbroker scale --coin BTC --side sell --size 0.5 --levels 4 --range 3 --reduce
307
+ ```
308
+
309
+ | Flag | Description | Default |
310
+ |------|-------------|---------|
311
+ | `--coin` | Asset to trade | **required** |
312
+ | `--side` | `buy` or `sell` | **required** |
313
+ | `--size` | Total order size in base asset | **required** |
314
+ | `--levels` | Number of price levels (orders) | **required** |
315
+ | `--range` | Price range from current mid in % | **required** |
316
+ | `--distribution` | Size distribution: `linear` (more at better prices), `exponential` (much more), `flat` (equal) | `linear` |
317
+ | `--tif` | Time in force: `GTC` or `ALO` | `GTC` |
318
+ | `--reduce` | Reduce-only orders (for scaling out) | `false` |
319
+ | `--dry` | Show order grid without placing | — |
320
+ | `--verbose` | Show debug output | — |
321
+
322
+ #### `bracket` — Bracket Order (Entry + TP + SL)
73
323
 
74
- # Bracket - entry with TP and SL
324
+ Complete trade setup in one command. Supports market or limit entry with automatic take-profit and stop-loss trigger orders.
325
+
326
+ ```bash
75
327
  openbroker bracket --coin ETH --side buy --size 0.5 --tp 3 --sl 1.5
328
+ openbroker bracket --coin BTC --side sell --size 0.1 --entry limit --price 100000 --tp 5 --sl 2
329
+ ```
330
+
331
+ | Flag | Description | Default |
332
+ |------|-------------|---------|
333
+ | `--coin` | Asset to trade | **required** |
334
+ | `--side` | Entry direction: `buy` (long) or `sell` (short) | **required** |
335
+ | `--size` | Position size in base asset | **required** |
336
+ | `--tp` | Take profit distance in % from entry | **required** |
337
+ | `--sl` | Stop loss distance in % from entry | **required** |
338
+ | `--entry` | Entry type: `market` or `limit` | `market` |
339
+ | `--price` | Entry price (required if `--entry limit`) | — |
340
+ | `--slippage` | Slippage for market entry in bps | `50` |
341
+ | `--dry` | Show bracket plan without executing | — |
342
+ | `--verbose` | Show debug output | — |
76
343
 
77
- # Chase - follow price with ALO orders
78
- openbroker chase --coin ETH --side buy --size 0.5 --timeout 300
344
+ Executes in 3 steps: Entry TP trigger → SL trigger. Shows risk/reward ratio and potential profit/loss.
345
+
346
+ #### `chase` — Chase Order
347
+
348
+ Follow the price with ALO (post-only) limit orders to get maker fills and avoid taker fees.
349
+
350
+ ```bash
351
+ openbroker chase --coin ETH --side buy --size 0.5
352
+ openbroker chase --coin SOL --side buy --size 10 --offset 1 --timeout 60 --max-chase 50
353
+ openbroker chase --coin BTC --side sell --size 0.1 --offset 2 --timeout 600
79
354
  ```
80
355
 
356
+ | Flag | Description | Default |
357
+ |------|-------------|---------|
358
+ | `--coin` | Asset to trade | **required** |
359
+ | `--side` | `buy` or `sell` | **required** |
360
+ | `--size` | Order size in base asset | **required** |
361
+ | `--offset` | Offset from mid price in bps | `5` (0.05%) |
362
+ | `--timeout` | Max time to chase in seconds | `300` (5 min) |
363
+ | `--interval` | Price check / order update interval in ms | `2000` |
364
+ | `--max-chase` | Max price to chase to in bps from start | `100` (1%) |
365
+ | `--reduce` | Reduce-only order | — |
366
+ | `--dry` | Show chase parameters without executing | — |
367
+ | `--verbose` | Show debug output | — |
368
+
369
+ Uses ALO orders exclusively, guaranteeing maker rebates. Stops when filled, timed out, or max chase reached.
370
+
371
+ ---
372
+
81
373
  ### Strategies
374
+
375
+ #### `funding-arb` — Funding Arbitrage
376
+
377
+ Collect funding payments by taking positions opposite to the majority. Monitors funding continuously and auto-closes when rates drop.
378
+
82
379
  ```bash
83
- # Funding arbitrage
84
380
  openbroker funding-arb --coin ETH --size 5000 --min-funding 25
381
+ openbroker funding-arb --coin BTC --size 10000 --duration 24 --check 30
382
+ openbroker funding-arb --coin ETH --size 5000 --dry
383
+ ```
384
+
385
+ | Flag | Description | Default |
386
+ |------|-------------|---------|
387
+ | `--coin` | Asset to trade | **required** |
388
+ | `--size` | Position size in USD notional | **required** |
389
+ | `--min-funding` | Minimum annualized funding rate to enter (%) | `20` |
390
+ | `--max-funding` | Maximum rate — avoid extreme/squeeze risk (%) | `200` |
391
+ | `--duration` | How long to run in hours | ∞ |
392
+ | `--check` | Funding check interval in minutes | `60` |
393
+ | `--close-at` | Close position when funding drops below X% | `5` |
394
+ | `--mode` | `perp` (directional) or `hedge` (delta neutral — not yet implemented) | `perp` |
395
+ | `--dry` | Show opportunity analysis without trading | — |
396
+ | `--verbose` | Show debug output | — |
85
397
 
86
- # Grid trading
398
+ **Note:** Hyperliquid funding is paid **hourly** (not 8h like CEXs). Annualized = hourly × 8,760.
399
+
400
+ #### `grid` — Grid Trading
401
+
402
+ Automatically buy low and sell high within a price range. Replaces filled orders on the opposite side.
403
+
404
+ ```bash
87
405
  openbroker grid --coin ETH --lower 3000 --upper 4000 --grids 10 --size 0.1
406
+ openbroker grid --coin BTC --lower 90000 --upper 100000 --grids 5 --size 0.01 --mode long
407
+ ```
408
+
409
+ | Flag | Description | Default |
410
+ |------|-------------|---------|
411
+ | `--coin` | Asset to trade | **required** |
412
+ | `--lower` | Lower bound of grid (price) | **required** |
413
+ | `--upper` | Upper bound of grid (price) | **required** |
414
+ | `--grids` | Number of grid levels | `10` |
415
+ | `--size` | Size per grid level in base asset | — |
416
+ | `--total-size` | OR total size to distribute across grids | — |
417
+ | `--mode` | `neutral` (buy+sell), `long` (buys only), `short` (sells only) | `neutral` |
418
+ | `--refresh` | Rebalance check interval in seconds | `60` |
419
+ | `--duration` | How long to run in hours | ∞ |
420
+ | `--dry` | Show grid plan without placing orders | — |
421
+ | `--verbose` | Show debug output | — |
422
+
423
+ Handles graceful shutdown (Ctrl+C) — cancels all grid orders and prints PnL summary.
424
+
425
+ #### `dca` — Dollar Cost Averaging
88
426
 
89
- # DCA
427
+ Accumulate a position over time with regular purchases at fixed USD amounts.
428
+
429
+ ```bash
90
430
  openbroker dca --coin ETH --amount 100 --interval 1h --count 24
431
+ openbroker dca --coin BTC --total 5000 --interval 1d --count 30
432
+ ```
433
+
434
+ | Flag | Description | Default |
435
+ |------|-------------|---------|
436
+ | `--coin` | Asset to accumulate | **required** |
437
+ | `--amount` | USD amount per purchase | — |
438
+ | `--total` | OR total USD to invest (calculates per-purchase) | — |
439
+ | `--interval` | Time between purchases: `Xm`, `Xh`, `Xd`, `Xw` | **required** |
440
+ | `--count` | Number of purchases to make | **required** |
441
+ | `--slippage` | Slippage tolerance in bps | `50` |
442
+ | `--dry` | Show DCA plan and schedule without executing | — |
443
+ | `--verbose` | Show debug output | — |
91
444
 
92
- # Market making
445
+ Reports running average price, total acquired, and unrealized PnL after completion.
446
+
447
+ #### `mm-maker` — Market Making (ALO / Maker-Only)
448
+
449
+ Provide liquidity using ALO (Add Liquidity Only) orders that are **rejected** if they would cross the spread. Guarantees you always earn the maker rebate (~0.3 bps). Reads the actual order book for pricing.
450
+
451
+ ```bash
93
452
  openbroker mm-maker --coin HYPE --size 1 --offset 1
453
+ openbroker mm-maker --coin ETH --size 0.1 --offset 2 --max-position 0.5
94
454
  ```
95
455
 
96
- ## Options
456
+ | Flag | Description | Default |
457
+ |------|-------------|---------|
458
+ | `--coin` | Asset to market make | **required** |
459
+ | `--size` | Order size on each side (base asset) | **required** |
460
+ | `--offset` | Offset from best bid/ask in bps | `1` |
461
+ | `--max-position` | Max net position before stopping that side | 3× size |
462
+ | `--skew-factor` | How aggressively to skew for inventory | `2.0` |
463
+ | `--refresh` | Refresh interval in milliseconds | `2000` |
464
+ | `--duration` | How long to run in minutes | ∞ |
465
+ | `--dry` | Show setup without trading | — |
466
+ | `--verbose` | Show debug output | — |
97
467
 
98
- | Option | Description |
99
- |--------|-------------|
100
- | `--coin` | Asset symbol (ETH, BTC, SOL, HYPE, etc.) |
101
- | `--side` | Order direction: `buy` or `sell` |
102
- | `--size` | Order size in base asset |
103
- | `--price` | Limit price |
104
- | `--dry` | Preview without executing |
105
- | `--help` | Show command help |
468
+ **Fee structure:** Taker ~2.5 bps (you pay), Maker ~0.3 bps (you earn). ALO-only = always earn.
469
+
470
+ #### `mm-spread` Market Making (Spread-Based)
471
+
472
+ Place bid/ask quotes around the mid price, earning the spread when both sides fill. Includes inventory skewing and cooldown after fills.
473
+
474
+ ```bash
475
+ openbroker mm-spread --coin ETH --size 0.1 --spread 10
476
+ openbroker mm-spread --coin BTC --size 0.01 --spread 5 --max-position 0.03 --cooldown 3000
477
+ ```
478
+
479
+ | Flag | Description | Default |
480
+ |------|-------------|---------|
481
+ | `--coin` | Asset to market make | **required** |
482
+ | `--size` | Order size on each side (base asset) | **required** |
483
+ | `--spread` | Total spread width in bps from mid | **required** |
484
+ | `--skew-factor` | How aggressively to skew for inventory | `2.0` |
485
+ | `--max-position` | Maximum net position | 3× size |
486
+ | `--cooldown` | Cooldown after fill before same-side requote (ms) | `5000` |
487
+ | `--refresh` | Refresh interval in milliseconds | `2000` |
488
+ | `--duration` | How long to run in minutes | ∞ |
489
+ | `--dry` | Show strategy parameters without trading | — |
490
+ | `--verbose` | Show debug output | — |
491
+
492
+ **Inventory management:** When LONG → bid wider, ask tighter. When SHORT → bid tighter, ask wider. At max position → stops quoting that side.
493
+
494
+ ---
495
+
496
+ ## Global Options
497
+
498
+ | Flag | Description |
499
+ |------|-------------|
500
+ | `--help`, `-h` | Show help for a command |
501
+ | `--dry` | Preview without executing (all trading/strategy commands) |
502
+ | `--verbose` | Show debug output including API requests/responses |
503
+ | `--version`, `-v` | Print the CLI version |
106
504
 
107
505
  ## Safety
108
506
 
@@ -142,17 +540,25 @@ export HYPERLIQUID_PRIVATE_KEY="0x..." # API wallet private key
142
540
  export HYPERLIQUID_ACCOUNT_ADDRESS="0x..." # Main account address
143
541
  ```
144
542
 
145
- **Note:** Builder fee must be approved with the main wallet first.
543
+ **Note:** Builder fee must be approved with the main wallet first. Sub-accounts cannot approve builder fees. After approval, you can switch to using the API wallet for trading.
146
544
 
147
545
  ## Builder Fee
148
546
 
149
547
  Open Broker charges **1 bps (0.01%)** per trade to fund development. The builder fee is automatically approved during `openbroker setup`.
150
548
 
151
549
  ```bash
152
- openbroker approve-builder --check # Check approval status
153
- openbroker approve-builder # Retry approval if needed
550
+ openbroker approve-builder --check # Check approval status
551
+ openbroker approve-builder # Retry approval if needed
552
+ openbroker approve-builder --max-fee "0.05%" # Custom max fee
154
553
  ```
155
554
 
555
+ | Flag | Description | Default |
556
+ |------|-------------|---------|
557
+ | `--check` | Only check current approval status, don't approve | — |
558
+ | `--max-fee` | Maximum fee rate to approve | `0.1%` |
559
+ | `--builder` | Custom builder address (advanced) | Open Broker |
560
+ | `--verbose` | Show debug output | — |
561
+
156
562
  ## Development
157
563
 
158
564
  For local development without global install:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openbroker",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "Hyperliquid trading CLI - execute orders, manage positions, and run trading strategies",
5
5
  "type": "module",
6
6
  "bin": {