perp-cli 0.3.9 → 0.3.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perp-cli",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "Multi-DEX Perpetual Futures CLI - Pacifica, Hyperliquid, Lighter",
5
5
  "bin": {
6
6
  "perp": "./dist/index.js",
@@ -5,7 +5,7 @@ allowed-tools: "Bash(perp:*), Bash(npx perp-cli:*), Bash(npx -y perp-cli:*)"
5
5
  license: MIT
6
6
  metadata:
7
7
  author: hypurrquant
8
- version: "0.3.9"
8
+ version: "0.3.10"
9
9
  mcp-server: perp-cli
10
10
  ---
11
11
 
@@ -34,14 +34,6 @@ npm install -g perp-cli
34
34
 
35
35
  CRITICAL: Do NOT use `perp init` — it is interactive and will hang.
36
36
 
37
- **If user provides a private key:**
38
- ```bash
39
- perp --json wallet set hl <KEY> # Hyperliquid (aliases: hl, hyperliquid)
40
- perp --json wallet set pac <KEY> # Pacifica (aliases: pac, pacifica)
41
- perp --json wallet set lt <KEY> # Lighter (aliases: lt, lighter)
42
- perp --json wallet set hl <KEY> --default # also set as default exchange
43
- ```
44
-
45
37
  **If user needs a new wallet:**
46
38
  ```bash
47
39
  perp --json wallet generate evm # creates EVM wallet for Hyperliquid + Lighter
@@ -49,6 +41,41 @@ perp --json wallet generate solana # creates Solana wallet for Pacific
49
41
  # IMPORTANT: Tell user the generated address so they can fund it with USDC!
50
42
  ```
51
43
 
44
+ ### Hyperliquid setup
45
+ ```bash
46
+ perp --json wallet set hl <EVM_PRIVATE_KEY> # register EVM key → ready to trade immediately
47
+ perp --json wallet show # verify
48
+ perp --json -e hl account info # check balance
49
+ ```
50
+ No extra steps. Key is saved as `HL_PRIVATE_KEY` in .env.
51
+
52
+ ### Pacifica setup
53
+ ```bash
54
+ perp --json wallet set pac <SOLANA_PRIVATE_KEY> # register Solana key → ready to trade immediately
55
+ perp --json wallet show # verify
56
+ perp --json -e pac account info # check balance
57
+ ```
58
+ No extra steps. Key is saved as `PACIFICA_PRIVATE_KEY` in .env.
59
+
60
+ ### Lighter setup (API key auto-generated on registration)
61
+ ```bash
62
+ perp --json wallet set lt <EVM_PRIVATE_KEY> # register EVM key
63
+ # → AUTOMATICALLY generates Lighter API key via on-chain tx
64
+ # → Saves to .env: LIGHTER_PRIVATE_KEY, LIGHTER_API_KEY, LIGHTER_ACCOUNT_INDEX, LIGHTER_API_KEY_INDEX
65
+ # → No manual API key creation needed. Do NOT ask the user to visit the Lighter website.
66
+ perp --json wallet show # verify
67
+ perp --json -e lighter account info # check balance
68
+ ```
69
+ Same EVM key can be used for both Hyperliquid and Lighter:
70
+ ```bash
71
+ perp --json wallet set hl <KEY> # same key
72
+ perp --json wallet set lt <KEY> # same key, different exchange binding
73
+ ```
74
+ If API key auto-setup fails (rare, e.g. no ETH for gas on Lighter chain):
75
+ ```bash
76
+ perp --json -e lighter manage setup-api-key # manual retry
77
+ ```
78
+
52
79
  **Verify setup (ALWAYS do this after any wallet command):**
53
80
  ```bash
54
81
  perp --json wallet show
@@ -75,13 +102,39 @@ Symbols are auto-resolved across exchanges. Use bare symbols (e.g., `BTC`, `SOL`
75
102
  ### Common operations
76
103
  ```bash
77
104
  perp --json wallet show # check configured wallets
78
- perp --json -e hl account info # balance & margin
79
- perp --json -e hl account positions # open positions
80
- perp --json -e hl market list # available markets
81
- perp --json -e hl market mid BTC # BTC mid price
82
- perp --json arb scan --min 5 # find funding arb opportunities (>5bps spread)
83
105
  perp --json portfolio # unified multi-exchange view
106
+ perp --json arb scan --min 5 # find funding arb opportunities (>5bps spread)
107
+ ```
108
+
109
+ ### Per-exchange commands (ALL 3 exchanges use the SAME commands)
110
+ Every command below works on ALL exchanges. Just change `-e`:
111
+ ```bash
112
+ # Account
113
+ perp --json -e hl account info # Hyperliquid balance & margin
114
+ perp --json -e pac account info # Pacifica balance & margin
115
+ perp --json -e lighter account info # Lighter balance & margin
116
+ perp --json -e <EX> account positions # open positions
117
+
118
+ # Market data
119
+ perp --json -e <EX> market list # available markets
120
+ perp --json -e <EX> market mid <SYM> # mid price
121
+ perp --json -e <EX> market book <SYM> # orderbook depth
122
+
123
+ # Trading (same syntax on ALL exchanges)
124
+ perp --json -e <EX> trade leverage <SYM> <N> --isolated # set leverage
125
+ perp --json -e <EX> trade market <SYM> buy <SIZE> # market buy
126
+ perp --json -e <EX> trade market <SYM> sell <SIZE> # market sell
127
+ perp --json -e <EX> trade close <SYM> # close position
128
+ perp --json -e <EX> trade check <SYM> <SIDE> <SIZE> --leverage <L> # pre-flight
129
+
130
+ # Deposit / Withdraw
131
+ perp --json deposit hyperliquid <AMOUNT> # deposit to HL
132
+ perp --json deposit pacifica <AMOUNT> # deposit to Pacifica
133
+ perp --json deposit lighter info # show Lighter deposit routes
134
+ perp --json deposit lighter cctp arb <AMOUNT> # deposit to Lighter via CCTP
135
+ perp --json withdraw <EX> <AMOUNT> # withdraw from exchange
84
136
  ```
137
+ **All 3 exchanges are fully operational.** Do NOT say any exchange "requires additional setup" or "is not available" — if `wallet show` shows it configured, it's ready to trade.
85
138
 
86
139
  ### Funding arb direction (CRITICAL — do NOT reverse)
87
140
  ```