hedgequantx 1.1.1 → 1.2.31
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/README.md +128 -136
- package/bin/cli.js +28 -2076
- package/package.json +3 -3
- package/src/app.js +550 -0
- package/src/config/index.js +16 -2
- package/src/config/propfirms.js +324 -12
- package/src/pages/accounts.js +115 -0
- package/src/pages/algo.js +538 -0
- package/src/pages/index.js +13 -2
- package/src/pages/orders.js +114 -0
- package/src/pages/positions.js +115 -0
- package/src/pages/stats.js +212 -3
- package/src/pages/user.js +92 -0
- package/src/security/encryption.js +168 -0
- package/src/security/index.js +61 -0
- package/src/security/rateLimit.js +155 -0
- package/src/security/validation.js +253 -0
- package/src/services/hqx-server.js +34 -17
- package/src/services/index.js +2 -1
- package/src/services/projectx.js +383 -35
- package/src/services/session.js +150 -38
- package/src/ui/index.js +4 -1
- package/src/ui/menu.js +154 -0
- package/src/services/local-storage.js +0 -309
package/README.md
CHANGED
|
@@ -1,60 +1,43 @@
|
|
|
1
1
|
# HedgeQuantX CLI
|
|
2
2
|
|
|
3
|
+
```
|
|
4
|
+
██╗ ██╗███████╗██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗████████╗██╗ ██╗
|
|
5
|
+
██║ ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██║ ██║██╔══██╗████╗ ██║╚══██╔══╝╚██╗██╔╝
|
|
6
|
+
███████║█████╗ ██║ ██║██║ ███╗█████╗ ██║ ██║██║ ██║███████║██╔██╗ ██║ ██║ ╚███╔╝
|
|
7
|
+
██╔══██║██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║▄▄ ██║██║ ██║██╔══██║██║╚██╗██║ ██║ ██╔██╗
|
|
8
|
+
██║ ██║███████╗██████╔╝╚██████╔╝███████╗╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║ ██║ ██╔╝ ██╗
|
|
9
|
+
╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝
|
|
10
|
+
```
|
|
11
|
+
|
|
3
12
|
**Prop Futures Algo Trading CLI**
|
|
4
13
|
|
|
5
14
|
A powerful command-line interface for connecting to prop trading firms and managing your futures trading accounts.
|
|
6
15
|
|
|
16
|
+
[](https://www.npmjs.com/package/hedgequantx)
|
|
17
|
+
[](https://www.npmjs.com/package/hedgequantx)
|
|
18
|
+
|
|
7
19
|
---
|
|
8
20
|
|
|
9
21
|
## Features
|
|
10
22
|
|
|
11
|
-
- Multi-platform
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- Secure
|
|
16
|
-
|
|
17
|
-
## Supported Prop Firms (ProjectX)
|
|
18
|
-
|
|
19
|
-
| Firm | Status |
|
|
20
|
-
|------|--------|
|
|
21
|
-
| Topstep | Active |
|
|
22
|
-
| Alpha Futures | Active |
|
|
23
|
-
| TickTickTrader | Active |
|
|
24
|
-
| Bulenox | Active |
|
|
25
|
-
| TradeDay | Active |
|
|
26
|
-
| Blusky | Active |
|
|
27
|
-
| Goat Futures | Active |
|
|
28
|
-
| The Futures Desk | Active |
|
|
29
|
-
| DayTraders | Active |
|
|
30
|
-
| E8 Futures | Active |
|
|
31
|
-
| Blue Guardian Futures | Active |
|
|
32
|
-
| FuturesElite | Active |
|
|
33
|
-
| FXIFY | Active |
|
|
34
|
-
| Hola Prime | Active |
|
|
35
|
-
| Top One Futures | Active |
|
|
36
|
-
| Funding Futures | Active |
|
|
37
|
-
| TX3 Funding | Active |
|
|
38
|
-
| Lucid Trading | Active |
|
|
39
|
-
| Tradeify | Active |
|
|
40
|
-
| Earn2Trade | Coming Soon |
|
|
23
|
+
- Multi-platform support (ProjectX, Tradovate, Rithmic)
|
|
24
|
+
- 37 supported prop firms
|
|
25
|
+
- Multi-account connections
|
|
26
|
+
- Real-time stats (balance, P&L, positions)
|
|
27
|
+
- Secure encrypted session storage
|
|
28
|
+
- Auto-update with restart
|
|
41
29
|
|
|
42
30
|
---
|
|
43
31
|
|
|
44
32
|
## Installation
|
|
45
33
|
|
|
46
|
-
###
|
|
47
|
-
|
|
48
|
-
- Node.js >= 16.x
|
|
49
|
-
- npm >= 8.x
|
|
50
|
-
|
|
51
|
-
### Option 1: Install from GitHub
|
|
34
|
+
### Option 1: NPM (Recommended)
|
|
52
35
|
|
|
53
36
|
```bash
|
|
54
|
-
npm install -g
|
|
37
|
+
npm install -g hedgequantx
|
|
55
38
|
```
|
|
56
39
|
|
|
57
|
-
### Option 2: Clone
|
|
40
|
+
### Option 2: Clone from GitHub
|
|
58
41
|
|
|
59
42
|
```bash
|
|
60
43
|
git clone https://github.com/HedgeQuantX/HQX-CLI.git
|
|
@@ -65,92 +48,90 @@ npm link
|
|
|
65
48
|
|
|
66
49
|
---
|
|
67
50
|
|
|
68
|
-
## Update
|
|
69
|
-
|
|
70
|
-
To update the CLI to the latest version:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
cd ~/HQX-CLI && git pull
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
That's it! Changes are applied immediately. No need to reinstall.
|
|
77
|
-
|
|
78
|
-
### Option 3: Download and Install
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# Download the package
|
|
82
|
-
curl -L -o hedgequantx.tgz https://github.com/HedgeQuantX/HQX-CLI/releases/latest/download/hedgequantx-1.0.0.tgz
|
|
83
|
-
|
|
84
|
-
# Install globally
|
|
85
|
-
npm install -g hedgequantx.tgz
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
51
|
## Usage
|
|
91
52
|
|
|
92
|
-
### Launch the CLI
|
|
93
|
-
|
|
94
53
|
```bash
|
|
54
|
+
# Launch CLI
|
|
95
55
|
hedgequantx
|
|
96
|
-
```
|
|
97
56
|
|
|
98
|
-
|
|
57
|
+
# Or use short alias
|
|
58
|
+
hqx
|
|
99
59
|
|
|
100
|
-
|
|
101
|
-
hedgequantx
|
|
102
|
-
hedgequantx --help # Show help
|
|
103
|
-
hedgequantx status # Show system status
|
|
60
|
+
# Show version
|
|
61
|
+
hedgequantx version
|
|
104
62
|
```
|
|
105
63
|
|
|
106
64
|
---
|
|
107
65
|
|
|
108
|
-
##
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
66
|
+
## Supported Prop Firms (37)
|
|
67
|
+
|
|
68
|
+
| ProjectX (19) | Rithmic (16) | Tradovate (2) |
|
|
69
|
+
|---------------|--------------|---------------|
|
|
70
|
+
| TopStep | Apex | Apex |
|
|
71
|
+
| Alpha Futures | TopstepTrader | TakeProfitTrader |
|
|
72
|
+
| TickTickTrader | MES Capital | |
|
|
73
|
+
| Bulenox | Bulenox | |
|
|
74
|
+
| TradeDay | TradeFundrr | |
|
|
75
|
+
| Blusky | TheTradingPit | |
|
|
76
|
+
| Goat Futures | FundedFuturesNetwork | |
|
|
77
|
+
| The Futures Desk | PropShopTrader | |
|
|
78
|
+
| DayTraders | 4PropTrader | |
|
|
79
|
+
| E8 Futures | DayTraders.com | |
|
|
80
|
+
| Blue Guardian Futures | 10XFutures | |
|
|
81
|
+
| FuturesElite | LucidTrading | |
|
|
82
|
+
| FXIFY | ThriveTrading | |
|
|
83
|
+
| Hola Prime | LegendsTrading | |
|
|
84
|
+
| Top One Futures | Earn2Trade | |
|
|
85
|
+
| Funding Futures | Tradesea | |
|
|
86
|
+
| TX3 Funding | | |
|
|
87
|
+
| Lucid Trading | | |
|
|
88
|
+
| Tradeify | | |
|
|
89
|
+
|
|
90
|
+
> **Note:** ProjectX firms are fully supported. Rithmic and Tradovate coming soon.
|
|
114
91
|
|
|
115
|
-
|
|
116
|
-
- ProjectX
|
|
117
|
-
- Rithmic (coming soon)
|
|
118
|
-
- Tradovate (coming soon)
|
|
119
|
-
|
|
120
|
-
3. **Choose your prop firm**
|
|
121
|
-
- Select from the list of supported firms
|
|
92
|
+
---
|
|
122
93
|
|
|
123
|
-
|
|
124
|
-
- Enter your username
|
|
125
|
-
- Enter your password
|
|
94
|
+
## Dashboard Features
|
|
126
95
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
96
|
+
- **View Accounts** - List all trading accounts with balance and status
|
|
97
|
+
- **View Positions** - Open positions with P&L
|
|
98
|
+
- **View Orders** - Pending and filled orders
|
|
99
|
+
- **View Stats** - Trading metrics, equity curve, P&L calendar
|
|
100
|
+
- **User Info** - Account details
|
|
101
|
+
- **Add Prop-Account** - Connect multiple prop firms
|
|
102
|
+
- **Algo-Trading** - Automated trading (coming soon)
|
|
103
|
+
- **Update HQX** - Auto-update with restart
|
|
132
104
|
|
|
133
105
|
---
|
|
134
106
|
|
|
135
107
|
## Screenshots
|
|
136
108
|
|
|
137
109
|
```
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
██║
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
110
|
+
╔══════════════════════════════════════════════════════════════════════════════════════════════╗
|
|
111
|
+
║██╗ ██╗███████╗██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗████████╗██╗ ██╗║
|
|
112
|
+
║██║ ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██║ ██║██╔══██╗████╗ ██║╚══██╔══╝╚██╗██╔╝║
|
|
113
|
+
║███████║█████╗ ██║ ██║██║ ███╗█████╗ ██║ ██║██║ ██║███████║██╔██╗ ██║ ██║ ╚███╔╝ ║
|
|
114
|
+
║██╔══██║██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║▄▄ ██║██║ ██║██╔══██║██║╚██╗██║ ██║ ██╔██╗ ║
|
|
115
|
+
║██║ ██║███████╗██████╔╝╚██████╔╝███████╗╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║ ██║ ██╔╝ ██╗║
|
|
116
|
+
║╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝║
|
|
117
|
+
╠══════════════════════════════════════════════════════════════════════════════════════════════╣
|
|
118
|
+
║ Prop Futures Algo Trading v1.2.0 ║
|
|
119
|
+
╠══════════════════════════════════════════════════════════════════════════════════════════════╣
|
|
120
|
+
║ Connections: 1 Accounts: 2 Balance: $299,776 P&L: $-223 (-0.1%) ║
|
|
121
|
+
╚══════════════════════════════════════════════════════════════════════════════════════════════╝
|
|
122
|
+
|
|
123
|
+
? Dashboard:
|
|
124
|
+
> View Accounts
|
|
125
|
+
View Positions
|
|
126
|
+
View Orders
|
|
127
|
+
View Stats
|
|
128
|
+
User Info
|
|
129
|
+
Add Prop-Account
|
|
130
|
+
──────────────
|
|
131
|
+
Algo-Trading
|
|
152
132
|
──────────────
|
|
153
|
-
|
|
133
|
+
Update HQX
|
|
134
|
+
Disconnect
|
|
154
135
|
```
|
|
155
136
|
|
|
156
137
|
---
|
|
@@ -160,45 +141,60 @@ hedgequantx status # Show system status
|
|
|
160
141
|
```
|
|
161
142
|
HQX-CLI/
|
|
162
143
|
├── bin/
|
|
163
|
-
│ └── cli.js
|
|
144
|
+
│ └── cli.js # Entry point
|
|
164
145
|
├── src/
|
|
165
|
-
│ ├──
|
|
166
|
-
│
|
|
167
|
-
│ │
|
|
168
|
-
│
|
|
169
|
-
│
|
|
146
|
+
│ ├── app.js # Main router
|
|
147
|
+
│ ├── config/
|
|
148
|
+
│ │ ├── index.js
|
|
149
|
+
│ │ ├── constants.js
|
|
150
|
+
│ │ └── propfirms.js # 37 PropFirms config
|
|
151
|
+
│ ├── pages/
|
|
152
|
+
│ │ ├── accounts.js
|
|
153
|
+
│ │ ├── orders.js
|
|
154
|
+
│ │ ├── positions.js
|
|
155
|
+
│ │ ├── stats.js
|
|
156
|
+
│ │ └── user.js
|
|
157
|
+
│ ├── security/
|
|
158
|
+
│ │ ├── encryption.js # AES-256-GCM
|
|
159
|
+
│ │ ├── validation.js # Input sanitization
|
|
160
|
+
│ │ └── rateLimit.js # API rate limiting
|
|
161
|
+
│ ├── services/
|
|
162
|
+
│ │ ├── projectx.js # ProjectX API
|
|
163
|
+
│ │ ├── session.js # Encrypted sessions
|
|
164
|
+
│ │ └── hqx-server.js # HQX Server API
|
|
165
|
+
│ └── ui/
|
|
166
|
+
│ ├── box.js
|
|
167
|
+
│ ├── table.js
|
|
168
|
+
│ └── device.js
|
|
170
169
|
├── package.json
|
|
171
|
-
├── claude.md # Development rules
|
|
172
170
|
└── README.md
|
|
173
171
|
```
|
|
174
172
|
|
|
175
173
|
---
|
|
176
174
|
|
|
177
|
-
##
|
|
175
|
+
## Security
|
|
178
176
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
- **GatewayAPI**: Trading operations (orders, positions)
|
|
185
|
-
- Host: `api.[propfirm].projectx.com`
|
|
177
|
+
- AES-256-GCM encrypted session storage
|
|
178
|
+
- Machine-bound encryption keys
|
|
179
|
+
- Input validation and sanitization
|
|
180
|
+
- API rate limiting
|
|
181
|
+
- Secure file permissions (0600)
|
|
186
182
|
|
|
187
183
|
---
|
|
188
184
|
|
|
189
|
-
##
|
|
185
|
+
## Update
|
|
190
186
|
|
|
191
|
-
|
|
187
|
+
The CLI has a built-in update feature:
|
|
192
188
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
189
|
+
1. Select **Update HQX** from the dashboard
|
|
190
|
+
2. CLI pulls latest changes from GitHub
|
|
191
|
+
3. Installs dependencies
|
|
192
|
+
4. Auto-restarts with new version
|
|
197
193
|
|
|
198
|
-
|
|
194
|
+
Or manually:
|
|
199
195
|
|
|
200
196
|
```bash
|
|
201
|
-
|
|
197
|
+
cd ~/HQX-CLI && git pull origin main
|
|
202
198
|
```
|
|
203
199
|
|
|
204
200
|
---
|
|
@@ -206,22 +202,18 @@ npm test
|
|
|
206
202
|
## Roadmap
|
|
207
203
|
|
|
208
204
|
- [x] ProjectX integration
|
|
209
|
-
- [x] Multi-propfirm support
|
|
205
|
+
- [x] Multi-propfirm support (37 firms)
|
|
210
206
|
- [x] Account viewing
|
|
211
207
|
- [x] Position viewing
|
|
212
208
|
- [x] Order viewing
|
|
209
|
+
- [x] Stats with equity curve
|
|
210
|
+
- [x] Encrypted sessions
|
|
211
|
+
- [x] Multi-account connections
|
|
213
212
|
- [ ] Rithmic integration
|
|
214
213
|
- [ ] Tradovate integration
|
|
215
214
|
- [ ] Algo trading engine
|
|
216
215
|
- [ ] Real-time market data
|
|
217
216
|
- [ ] Order placement
|
|
218
|
-
- [ ] Strategy builder
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## Contributing
|
|
223
|
-
|
|
224
|
-
Contributions are welcome! Please read our contributing guidelines before submitting a PR.
|
|
225
217
|
|
|
226
218
|
---
|
|
227
219
|
|
|
@@ -239,8 +231,8 @@ This software is for educational and informational purposes only. Trading future
|
|
|
239
231
|
|
|
240
232
|
## Support
|
|
241
233
|
|
|
234
|
+
- Discord: [https://discord.gg/UBKCERctZu](https://discord.gg/UBKCERctZu)
|
|
242
235
|
- GitHub Issues: [https://github.com/HedgeQuantX/HQX-CLI/issues](https://github.com/HedgeQuantX/HQX-CLI/issues)
|
|
243
|
-
- Email: marat.himet@gmail.com
|
|
244
236
|
|
|
245
237
|
---
|
|
246
238
|
|