@gaberoo/kalshitools 1.0.2 → 1.1.0
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 +328 -27
- package/dist/commands/config/init.js +4 -4
- package/dist/commands/config/show.js +5 -5
- package/dist/commands/markets/list.d.ts +5 -1
- package/dist/commands/markets/list.js +28 -8
- package/dist/commands/markets/orderbook.d.ts +13 -0
- package/dist/commands/markets/orderbook.js +83 -0
- package/dist/commands/markets/scan.d.ts +18 -0
- package/dist/commands/markets/scan.js +237 -0
- package/dist/commands/markets/show.d.ts +3 -3
- package/dist/commands/markets/show.js +7 -7
- package/dist/commands/orders/cancel.d.ts +3 -3
- package/dist/commands/orders/cancel.js +7 -7
- package/dist/commands/orders/create.d.ts +5 -5
- package/dist/commands/orders/create.js +33 -33
- package/dist/commands/orders/list.d.ts +1 -1
- package/dist/commands/orders/list.js +9 -9
- package/dist/commands/portfolio/analytics.d.ts +12 -0
- package/dist/commands/portfolio/analytics.js +192 -0
- package/dist/commands/portfolio/fills.d.ts +1 -1
- package/dist/commands/portfolio/fills.js +7 -7
- package/dist/commands/portfolio/history.d.ts +14 -0
- package/dist/commands/portfolio/history.js +245 -0
- package/dist/commands/portfolio/positions.d.ts +1 -0
- package/dist/commands/portfolio/positions.js +11 -2
- package/dist/commands/portfolio/risk.d.ts +11 -0
- package/dist/commands/portfolio/risk.js +206 -0
- package/dist/lib/analytics.d.ts +64 -0
- package/dist/lib/analytics.js +236 -0
- package/dist/lib/base-command.d.ts +2 -2
- package/dist/lib/base-command.js +8 -8
- package/dist/lib/config/manager.d.ts +25 -25
- package/dist/lib/config/manager.js +51 -51
- package/dist/lib/config/schema.d.ts +11 -11
- package/dist/lib/config/schema.js +6 -6
- package/dist/lib/errors/base.d.ts +10 -10
- package/dist/lib/errors/base.js +7 -7
- package/dist/lib/kalshi/auth.d.ts +4 -4
- package/dist/lib/kalshi/auth.js +24 -24
- package/dist/lib/kalshi/client.d.ts +35 -35
- package/dist/lib/kalshi/client.js +93 -91
- package/dist/lib/kalshi/index.d.ts +1 -1
- package/dist/lib/kalshi/index.js +1 -1
- package/dist/lib/kalshi/types.d.ts +53 -53
- package/dist/lib/logger.js +3 -3
- package/dist/lib/output/formatter.d.ts +20 -20
- package/dist/lib/output/formatter.js +55 -55
- package/dist/lib/retry.d.ts +2 -2
- package/dist/lib/retry.js +8 -10
- package/dist/lib/risk.d.ts +51 -0
- package/dist/lib/risk.js +153 -0
- package/dist/lib/sanitize.js +9 -9
- package/dist/lib/scanner.d.ts +58 -0
- package/dist/lib/scanner.js +160 -0
- package/dist/lib/shutdown.d.ts +4 -4
- package/dist/lib/shutdown.js +7 -7
- package/dist/lib/validation.d.ts +5 -5
- package/dist/lib/validation.js +14 -20
- package/docs/TRADING_STRATEGIES.md +538 -0
- package/oclif.manifest.json +559 -170
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -90,98 +90,6 @@
|
|
|
90
90
|
"show.js"
|
|
91
91
|
]
|
|
92
92
|
},
|
|
93
|
-
"markets:list": {
|
|
94
|
-
"aliases": [],
|
|
95
|
-
"args": {},
|
|
96
|
-
"description": "List prediction markets",
|
|
97
|
-
"examples": [
|
|
98
|
-
"<%= config.bin %> <%= command.id %>",
|
|
99
|
-
"<%= config.bin %> <%= command.id %> --status active --limit 10",
|
|
100
|
-
"<%= config.bin %> <%= command.id %> --json"
|
|
101
|
-
],
|
|
102
|
-
"flags": {
|
|
103
|
-
"json": {
|
|
104
|
-
"description": "Output in JSON format",
|
|
105
|
-
"name": "json",
|
|
106
|
-
"allowNo": false,
|
|
107
|
-
"type": "boolean"
|
|
108
|
-
},
|
|
109
|
-
"status": {
|
|
110
|
-
"description": "Filter by market status",
|
|
111
|
-
"name": "status",
|
|
112
|
-
"hasDynamicHelp": false,
|
|
113
|
-
"multiple": false,
|
|
114
|
-
"options": [
|
|
115
|
-
"active",
|
|
116
|
-
"closed",
|
|
117
|
-
"settled",
|
|
118
|
-
"finalized"
|
|
119
|
-
],
|
|
120
|
-
"type": "option"
|
|
121
|
-
},
|
|
122
|
-
"limit": {
|
|
123
|
-
"description": "Maximum number of markets to return",
|
|
124
|
-
"name": "limit",
|
|
125
|
-
"default": 20,
|
|
126
|
-
"hasDynamicHelp": false,
|
|
127
|
-
"multiple": false,
|
|
128
|
-
"type": "option"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"hasDynamicHelp": false,
|
|
132
|
-
"hiddenAliases": [],
|
|
133
|
-
"id": "markets:list",
|
|
134
|
-
"pluginAlias": "@gaberoo/kalshitools",
|
|
135
|
-
"pluginName": "@gaberoo/kalshitools",
|
|
136
|
-
"pluginType": "core",
|
|
137
|
-
"strict": true,
|
|
138
|
-
"enableJsonFlag": false,
|
|
139
|
-
"isESM": true,
|
|
140
|
-
"relativePath": [
|
|
141
|
-
"dist",
|
|
142
|
-
"commands",
|
|
143
|
-
"markets",
|
|
144
|
-
"list.js"
|
|
145
|
-
]
|
|
146
|
-
},
|
|
147
|
-
"markets:show": {
|
|
148
|
-
"aliases": [],
|
|
149
|
-
"args": {
|
|
150
|
-
"ticker": {
|
|
151
|
-
"description": "Market ticker symbol",
|
|
152
|
-
"name": "ticker",
|
|
153
|
-
"required": true
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
"description": "Show market details",
|
|
157
|
-
"examples": [
|
|
158
|
-
"<%= config.bin %> <%= command.id %> TICKER",
|
|
159
|
-
"<%= config.bin %> <%= command.id %> TICKER --json"
|
|
160
|
-
],
|
|
161
|
-
"flags": {
|
|
162
|
-
"json": {
|
|
163
|
-
"description": "Output in JSON format",
|
|
164
|
-
"name": "json",
|
|
165
|
-
"allowNo": false,
|
|
166
|
-
"type": "boolean"
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
"hasDynamicHelp": false,
|
|
170
|
-
"hiddenAliases": [],
|
|
171
|
-
"id": "markets:show",
|
|
172
|
-
"pluginAlias": "@gaberoo/kalshitools",
|
|
173
|
-
"pluginName": "@gaberoo/kalshitools",
|
|
174
|
-
"pluginType": "core",
|
|
175
|
-
"strict": true,
|
|
176
|
-
"enableJsonFlag": false,
|
|
177
|
-
"isESM": true,
|
|
178
|
-
"relativePath": [
|
|
179
|
-
"dist",
|
|
180
|
-
"commands",
|
|
181
|
-
"markets",
|
|
182
|
-
"show.js"
|
|
183
|
-
]
|
|
184
|
-
},
|
|
185
93
|
"orders:cancel": {
|
|
186
94
|
"aliases": [],
|
|
187
95
|
"args": {
|
|
@@ -245,15 +153,6 @@
|
|
|
245
153
|
"allowNo": false,
|
|
246
154
|
"type": "boolean"
|
|
247
155
|
},
|
|
248
|
-
"ticker": {
|
|
249
|
-
"char": "t",
|
|
250
|
-
"description": "Market ticker symbol",
|
|
251
|
-
"name": "ticker",
|
|
252
|
-
"required": true,
|
|
253
|
-
"hasDynamicHelp": false,
|
|
254
|
-
"multiple": false,
|
|
255
|
-
"type": "option"
|
|
256
|
-
},
|
|
257
156
|
"action": {
|
|
258
157
|
"char": "a",
|
|
259
158
|
"description": "Order action (buy or sell)",
|
|
@@ -267,6 +166,29 @@
|
|
|
267
166
|
],
|
|
268
167
|
"type": "option"
|
|
269
168
|
},
|
|
169
|
+
"dry-run": {
|
|
170
|
+
"description": "Simulate the order without actually placing it",
|
|
171
|
+
"name": "dry-run",
|
|
172
|
+
"allowNo": false,
|
|
173
|
+
"type": "boolean"
|
|
174
|
+
},
|
|
175
|
+
"price": {
|
|
176
|
+
"char": "p",
|
|
177
|
+
"description": "Limit price (required for limit orders, 0.01-0.99)",
|
|
178
|
+
"name": "price",
|
|
179
|
+
"hasDynamicHelp": false,
|
|
180
|
+
"multiple": false,
|
|
181
|
+
"type": "option"
|
|
182
|
+
},
|
|
183
|
+
"quantity": {
|
|
184
|
+
"char": "q",
|
|
185
|
+
"description": "Number of contracts",
|
|
186
|
+
"name": "quantity",
|
|
187
|
+
"required": true,
|
|
188
|
+
"hasDynamicHelp": false,
|
|
189
|
+
"multiple": false,
|
|
190
|
+
"type": "option"
|
|
191
|
+
},
|
|
270
192
|
"side": {
|
|
271
193
|
"char": "s",
|
|
272
194
|
"description": "Contract side (yes or no)",
|
|
@@ -280,10 +202,10 @@
|
|
|
280
202
|
],
|
|
281
203
|
"type": "option"
|
|
282
204
|
},
|
|
283
|
-
"
|
|
284
|
-
"char": "
|
|
285
|
-
"description": "
|
|
286
|
-
"name": "
|
|
205
|
+
"ticker": {
|
|
206
|
+
"char": "t",
|
|
207
|
+
"description": "Market ticker symbol",
|
|
208
|
+
"name": "ticker",
|
|
287
209
|
"required": true,
|
|
288
210
|
"hasDynamicHelp": false,
|
|
289
211
|
"multiple": false,
|
|
@@ -301,26 +223,12 @@
|
|
|
301
223
|
],
|
|
302
224
|
"type": "option"
|
|
303
225
|
},
|
|
304
|
-
"price": {
|
|
305
|
-
"char": "p",
|
|
306
|
-
"description": "Limit price (required for limit orders, 0.01-0.99)",
|
|
307
|
-
"name": "price",
|
|
308
|
-
"hasDynamicHelp": false,
|
|
309
|
-
"multiple": false,
|
|
310
|
-
"type": "option"
|
|
311
|
-
},
|
|
312
226
|
"yes": {
|
|
313
227
|
"char": "y",
|
|
314
228
|
"description": "Skip confirmation prompt",
|
|
315
229
|
"name": "yes",
|
|
316
230
|
"allowNo": false,
|
|
317
231
|
"type": "boolean"
|
|
318
|
-
},
|
|
319
|
-
"dry-run": {
|
|
320
|
-
"description": "Simulate the order without actually placing it",
|
|
321
|
-
"name": "dry-run",
|
|
322
|
-
"allowNo": false,
|
|
323
|
-
"type": "boolean"
|
|
324
232
|
}
|
|
325
233
|
},
|
|
326
234
|
"hasDynamicHelp": false,
|
|
@@ -356,6 +264,14 @@
|
|
|
356
264
|
"allowNo": false,
|
|
357
265
|
"type": "boolean"
|
|
358
266
|
},
|
|
267
|
+
"limit": {
|
|
268
|
+
"description": "Maximum number of orders to return",
|
|
269
|
+
"name": "limit",
|
|
270
|
+
"default": 50,
|
|
271
|
+
"hasDynamicHelp": false,
|
|
272
|
+
"multiple": false,
|
|
273
|
+
"type": "option"
|
|
274
|
+
},
|
|
359
275
|
"status": {
|
|
360
276
|
"description": "Filter by order status",
|
|
361
277
|
"name": "status",
|
|
@@ -376,14 +292,6 @@
|
|
|
376
292
|
"hasDynamicHelp": false,
|
|
377
293
|
"multiple": false,
|
|
378
294
|
"type": "option"
|
|
379
|
-
},
|
|
380
|
-
"limit": {
|
|
381
|
-
"description": "Maximum number of orders to return",
|
|
382
|
-
"name": "limit",
|
|
383
|
-
"default": 50,
|
|
384
|
-
"hasDynamicHelp": false,
|
|
385
|
-
"multiple": false,
|
|
386
|
-
"type": "option"
|
|
387
295
|
}
|
|
388
296
|
},
|
|
389
297
|
"hasDynamicHelp": false,
|
|
@@ -402,12 +310,16 @@
|
|
|
402
310
|
"list.js"
|
|
403
311
|
]
|
|
404
312
|
},
|
|
405
|
-
"
|
|
313
|
+
"markets:list": {
|
|
406
314
|
"aliases": [],
|
|
407
315
|
"args": {},
|
|
408
|
-
"description": "
|
|
316
|
+
"description": "List prediction markets",
|
|
409
317
|
"examples": [
|
|
410
318
|
"<%= config.bin %> <%= command.id %>",
|
|
319
|
+
"<%= config.bin %> <%= command.id %> --status active --limit 10",
|
|
320
|
+
"<%= config.bin %> <%= command.id %> --event-ticker ELECTION-2024",
|
|
321
|
+
"<%= config.bin %> <%= command.id %> --tickers \"TICKER1,TICKER2,TICKER3\"",
|
|
322
|
+
"<%= config.bin %> <%= command.id %> --with-nested",
|
|
411
323
|
"<%= config.bin %> <%= command.id %> --json"
|
|
412
324
|
],
|
|
413
325
|
"flags": {
|
|
@@ -416,11 +328,59 @@
|
|
|
416
328
|
"name": "json",
|
|
417
329
|
"allowNo": false,
|
|
418
330
|
"type": "boolean"
|
|
331
|
+
},
|
|
332
|
+
"event-ticker": {
|
|
333
|
+
"description": "Filter by event ticker",
|
|
334
|
+
"name": "event-ticker",
|
|
335
|
+
"hasDynamicHelp": false,
|
|
336
|
+
"multiple": false,
|
|
337
|
+
"type": "option"
|
|
338
|
+
},
|
|
339
|
+
"limit": {
|
|
340
|
+
"description": "Maximum number of markets to return",
|
|
341
|
+
"name": "limit",
|
|
342
|
+
"default": 20,
|
|
343
|
+
"hasDynamicHelp": false,
|
|
344
|
+
"multiple": false,
|
|
345
|
+
"type": "option"
|
|
346
|
+
},
|
|
347
|
+
"series-ticker": {
|
|
348
|
+
"description": "Filter by series ticker",
|
|
349
|
+
"name": "series-ticker",
|
|
350
|
+
"hasDynamicHelp": false,
|
|
351
|
+
"multiple": false,
|
|
352
|
+
"type": "option"
|
|
353
|
+
},
|
|
354
|
+
"status": {
|
|
355
|
+
"description": "Filter by market status",
|
|
356
|
+
"name": "status",
|
|
357
|
+
"hasDynamicHelp": false,
|
|
358
|
+
"multiple": false,
|
|
359
|
+
"options": [
|
|
360
|
+
"active",
|
|
361
|
+
"closed",
|
|
362
|
+
"settled",
|
|
363
|
+
"finalized"
|
|
364
|
+
],
|
|
365
|
+
"type": "option"
|
|
366
|
+
},
|
|
367
|
+
"tickers": {
|
|
368
|
+
"description": "Comma-separated list of tickers to fetch",
|
|
369
|
+
"name": "tickers",
|
|
370
|
+
"hasDynamicHelp": false,
|
|
371
|
+
"multiple": false,
|
|
372
|
+
"type": "option"
|
|
373
|
+
},
|
|
374
|
+
"with-nested": {
|
|
375
|
+
"description": "Include nested markets",
|
|
376
|
+
"name": "with-nested",
|
|
377
|
+
"allowNo": false,
|
|
378
|
+
"type": "boolean"
|
|
419
379
|
}
|
|
420
380
|
},
|
|
421
381
|
"hasDynamicHelp": false,
|
|
422
382
|
"hiddenAliases": [],
|
|
423
|
-
"id": "
|
|
383
|
+
"id": "markets:list",
|
|
424
384
|
"pluginAlias": "@gaberoo/kalshitools",
|
|
425
385
|
"pluginName": "@gaberoo/kalshitools",
|
|
426
386
|
"pluginType": "core",
|
|
@@ -430,19 +390,24 @@
|
|
|
430
390
|
"relativePath": [
|
|
431
391
|
"dist",
|
|
432
392
|
"commands",
|
|
433
|
-
"
|
|
434
|
-
"
|
|
393
|
+
"markets",
|
|
394
|
+
"list.js"
|
|
435
395
|
]
|
|
436
396
|
},
|
|
437
|
-
"
|
|
397
|
+
"markets:orderbook": {
|
|
438
398
|
"aliases": [],
|
|
439
|
-
"args": {
|
|
440
|
-
|
|
399
|
+
"args": {
|
|
400
|
+
"ticker": {
|
|
401
|
+
"description": "Market ticker symbol",
|
|
402
|
+
"name": "ticker",
|
|
403
|
+
"required": true
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"description": "Show order book for a market",
|
|
441
407
|
"examples": [
|
|
442
|
-
"<%= config.bin %> <%= command.id %>",
|
|
443
|
-
"<%= config.bin %> <%= command.id %> --
|
|
444
|
-
"<%= config.bin %> <%= command.id %> --
|
|
445
|
-
"<%= config.bin %> <%= command.id %> --json"
|
|
408
|
+
"<%= config.bin %> <%= command.id %> TICKER",
|
|
409
|
+
"<%= config.bin %> <%= command.id %> TICKER --depth 5",
|
|
410
|
+
"<%= config.bin %> <%= command.id %> TICKER --json"
|
|
446
411
|
],
|
|
447
412
|
"flags": {
|
|
448
413
|
"json": {
|
|
@@ -451,17 +416,10 @@
|
|
|
451
416
|
"allowNo": false,
|
|
452
417
|
"type": "boolean"
|
|
453
418
|
},
|
|
454
|
-
"
|
|
455
|
-
"description": "
|
|
456
|
-
"name": "
|
|
457
|
-
"
|
|
458
|
-
"multiple": false,
|
|
459
|
-
"type": "option"
|
|
460
|
-
},
|
|
461
|
-
"limit": {
|
|
462
|
-
"description": "Maximum number of fills to return",
|
|
463
|
-
"name": "limit",
|
|
464
|
-
"default": 50,
|
|
419
|
+
"depth": {
|
|
420
|
+
"description": "Number of price levels to show",
|
|
421
|
+
"name": "depth",
|
|
422
|
+
"default": 10,
|
|
465
423
|
"hasDynamicHelp": false,
|
|
466
424
|
"multiple": false,
|
|
467
425
|
"type": "option"
|
|
@@ -469,7 +427,7 @@
|
|
|
469
427
|
},
|
|
470
428
|
"hasDynamicHelp": false,
|
|
471
429
|
"hiddenAliases": [],
|
|
472
|
-
"id": "
|
|
430
|
+
"id": "markets:orderbook",
|
|
473
431
|
"pluginAlias": "@gaberoo/kalshitools",
|
|
474
432
|
"pluginName": "@gaberoo/kalshitools",
|
|
475
433
|
"pluginType": "core",
|
|
@@ -479,16 +437,19 @@
|
|
|
479
437
|
"relativePath": [
|
|
480
438
|
"dist",
|
|
481
439
|
"commands",
|
|
482
|
-
"
|
|
483
|
-
"
|
|
440
|
+
"markets",
|
|
441
|
+
"orderbook.js"
|
|
484
442
|
]
|
|
485
443
|
},
|
|
486
|
-
"
|
|
444
|
+
"markets:scan": {
|
|
487
445
|
"aliases": [],
|
|
488
446
|
"args": {},
|
|
489
|
-
"description": "
|
|
447
|
+
"description": "Scan markets for trading opportunities based on liquidity and spreads",
|
|
490
448
|
"examples": [
|
|
491
449
|
"<%= config.bin %> <%= command.id %>",
|
|
450
|
+
"<%= config.bin %> <%= command.id %> --min-liquidity 200 --min-spread 0.05",
|
|
451
|
+
"<%= config.bin %> <%= command.id %> --event-ticker EVENT-2024",
|
|
452
|
+
"<%= config.bin %> <%= command.id %> --sort-by liquidity --limit 20",
|
|
492
453
|
"<%= config.bin %> <%= command.id %> --json"
|
|
493
454
|
],
|
|
494
455
|
"flags": {
|
|
@@ -497,24 +458,452 @@
|
|
|
497
458
|
"name": "json",
|
|
498
459
|
"allowNo": false,
|
|
499
460
|
"type": "boolean"
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
461
|
+
},
|
|
462
|
+
"depth": {
|
|
463
|
+
"description": "Orderbook depth to fetch for analysis",
|
|
464
|
+
"name": "depth",
|
|
465
|
+
"default": 5,
|
|
466
|
+
"hasDynamicHelp": false,
|
|
467
|
+
"multiple": false,
|
|
468
|
+
"type": "option"
|
|
469
|
+
},
|
|
470
|
+
"event-ticker": {
|
|
471
|
+
"description": "Filter to specific event",
|
|
472
|
+
"name": "event-ticker",
|
|
473
|
+
"hasDynamicHelp": false,
|
|
474
|
+
"multiple": false,
|
|
475
|
+
"type": "option"
|
|
476
|
+
},
|
|
477
|
+
"limit": {
|
|
478
|
+
"description": "Maximum markets to scan",
|
|
479
|
+
"name": "limit",
|
|
480
|
+
"default": 50,
|
|
481
|
+
"hasDynamicHelp": false,
|
|
482
|
+
"multiple": false,
|
|
483
|
+
"type": "option"
|
|
484
|
+
},
|
|
485
|
+
"max-spread": {
|
|
486
|
+
"description": "Maximum spread in cents (e.g., 0.30 = 30 cents)",
|
|
487
|
+
"name": "max-spread",
|
|
488
|
+
"default": "0.30",
|
|
489
|
+
"hasDynamicHelp": false,
|
|
490
|
+
"multiple": false,
|
|
491
|
+
"type": "option"
|
|
492
|
+
},
|
|
493
|
+
"min-liquidity": {
|
|
494
|
+
"description": "Minimum orderbook depth in dollars",
|
|
495
|
+
"name": "min-liquidity",
|
|
496
|
+
"default": "100",
|
|
497
|
+
"hasDynamicHelp": false,
|
|
498
|
+
"multiple": false,
|
|
499
|
+
"type": "option"
|
|
500
|
+
},
|
|
501
|
+
"min-spread": {
|
|
502
|
+
"description": "Minimum spread in cents (e.g., 0.03 = 3 cents)",
|
|
503
|
+
"name": "min-spread",
|
|
504
|
+
"default": "0.03",
|
|
505
|
+
"hasDynamicHelp": false,
|
|
506
|
+
"multiple": false,
|
|
507
|
+
"type": "option"
|
|
508
|
+
},
|
|
509
|
+
"min-volume": {
|
|
510
|
+
"description": "Minimum 24h volume in dollars",
|
|
511
|
+
"name": "min-volume",
|
|
512
|
+
"default": "500",
|
|
513
|
+
"hasDynamicHelp": false,
|
|
514
|
+
"multiple": false,
|
|
515
|
+
"type": "option"
|
|
516
|
+
},
|
|
517
|
+
"series-ticker": {
|
|
518
|
+
"description": "Filter to specific series",
|
|
519
|
+
"name": "series-ticker",
|
|
520
|
+
"hasDynamicHelp": false,
|
|
521
|
+
"multiple": false,
|
|
522
|
+
"type": "option"
|
|
523
|
+
},
|
|
524
|
+
"sort-by": {
|
|
525
|
+
"description": "Ranking criteria",
|
|
526
|
+
"name": "sort-by",
|
|
527
|
+
"default": "score",
|
|
528
|
+
"hasDynamicHelp": false,
|
|
529
|
+
"multiple": false,
|
|
530
|
+
"options": [
|
|
531
|
+
"liquidity",
|
|
532
|
+
"score",
|
|
533
|
+
"spread",
|
|
534
|
+
"volume"
|
|
535
|
+
],
|
|
536
|
+
"type": "option"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"hasDynamicHelp": false,
|
|
540
|
+
"hiddenAliases": [],
|
|
541
|
+
"id": "markets:scan",
|
|
542
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
543
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
544
|
+
"pluginType": "core",
|
|
545
|
+
"strict": true,
|
|
546
|
+
"enableJsonFlag": false,
|
|
547
|
+
"isESM": true,
|
|
548
|
+
"relativePath": [
|
|
549
|
+
"dist",
|
|
550
|
+
"commands",
|
|
551
|
+
"markets",
|
|
552
|
+
"scan.js"
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
"markets:show": {
|
|
556
|
+
"aliases": [],
|
|
557
|
+
"args": {
|
|
558
|
+
"ticker": {
|
|
559
|
+
"description": "Market ticker symbol",
|
|
560
|
+
"name": "ticker",
|
|
561
|
+
"required": true
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"description": "Show market details",
|
|
565
|
+
"examples": [
|
|
566
|
+
"<%= config.bin %> <%= command.id %> TICKER",
|
|
567
|
+
"<%= config.bin %> <%= command.id %> TICKER --json"
|
|
568
|
+
],
|
|
569
|
+
"flags": {
|
|
570
|
+
"json": {
|
|
571
|
+
"description": "Output in JSON format",
|
|
572
|
+
"name": "json",
|
|
573
|
+
"allowNo": false,
|
|
574
|
+
"type": "boolean"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"hasDynamicHelp": false,
|
|
578
|
+
"hiddenAliases": [],
|
|
579
|
+
"id": "markets:show",
|
|
580
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
581
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
582
|
+
"pluginType": "core",
|
|
583
|
+
"strict": true,
|
|
584
|
+
"enableJsonFlag": false,
|
|
585
|
+
"isESM": true,
|
|
586
|
+
"relativePath": [
|
|
587
|
+
"dist",
|
|
588
|
+
"commands",
|
|
589
|
+
"markets",
|
|
590
|
+
"show.js"
|
|
591
|
+
]
|
|
592
|
+
},
|
|
593
|
+
"portfolio:analytics": {
|
|
594
|
+
"aliases": [],
|
|
595
|
+
"args": {},
|
|
596
|
+
"description": "Comprehensive portfolio performance analytics",
|
|
597
|
+
"examples": [
|
|
598
|
+
"<%= config.bin %> <%= command.id %>",
|
|
599
|
+
"<%= config.bin %> <%= command.id %> --period 7",
|
|
600
|
+
"<%= config.bin %> <%= command.id %> --min-ts 2026-01-01T00:00:00Z",
|
|
601
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
602
|
+
],
|
|
603
|
+
"flags": {
|
|
604
|
+
"json": {
|
|
605
|
+
"description": "Output in JSON format",
|
|
606
|
+
"name": "json",
|
|
607
|
+
"allowNo": false,
|
|
608
|
+
"type": "boolean"
|
|
609
|
+
},
|
|
610
|
+
"max-ts": {
|
|
611
|
+
"description": "End date for analysis (ISO-8601 format)",
|
|
612
|
+
"name": "max-ts",
|
|
613
|
+
"hasDynamicHelp": false,
|
|
614
|
+
"multiple": false,
|
|
615
|
+
"type": "option"
|
|
616
|
+
},
|
|
617
|
+
"min-ts": {
|
|
618
|
+
"description": "Start date for analysis (ISO-8601 format)",
|
|
619
|
+
"name": "min-ts",
|
|
620
|
+
"hasDynamicHelp": false,
|
|
621
|
+
"multiple": false,
|
|
622
|
+
"type": "option"
|
|
623
|
+
},
|
|
624
|
+
"period": {
|
|
625
|
+
"description": "Analysis period in days (overridden by min-ts/max-ts)",
|
|
626
|
+
"name": "period",
|
|
627
|
+
"hasDynamicHelp": false,
|
|
628
|
+
"multiple": false,
|
|
629
|
+
"type": "option"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"hasDynamicHelp": false,
|
|
633
|
+
"hiddenAliases": [],
|
|
634
|
+
"id": "portfolio:analytics",
|
|
635
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
636
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
637
|
+
"pluginType": "core",
|
|
638
|
+
"strict": true,
|
|
639
|
+
"enableJsonFlag": false,
|
|
640
|
+
"isESM": true,
|
|
641
|
+
"relativePath": [
|
|
642
|
+
"dist",
|
|
643
|
+
"commands",
|
|
644
|
+
"portfolio",
|
|
645
|
+
"analytics.js"
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
"portfolio:balance": {
|
|
649
|
+
"aliases": [],
|
|
650
|
+
"args": {},
|
|
651
|
+
"description": "View account balance",
|
|
652
|
+
"examples": [
|
|
653
|
+
"<%= config.bin %> <%= command.id %>",
|
|
654
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
655
|
+
],
|
|
656
|
+
"flags": {
|
|
657
|
+
"json": {
|
|
658
|
+
"description": "Output in JSON format",
|
|
659
|
+
"name": "json",
|
|
660
|
+
"allowNo": false,
|
|
661
|
+
"type": "boolean"
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
"hasDynamicHelp": false,
|
|
665
|
+
"hiddenAliases": [],
|
|
666
|
+
"id": "portfolio:balance",
|
|
667
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
668
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
669
|
+
"pluginType": "core",
|
|
670
|
+
"strict": true,
|
|
671
|
+
"enableJsonFlag": false,
|
|
672
|
+
"isESM": true,
|
|
673
|
+
"relativePath": [
|
|
674
|
+
"dist",
|
|
675
|
+
"commands",
|
|
676
|
+
"portfolio",
|
|
677
|
+
"balance.js"
|
|
678
|
+
]
|
|
679
|
+
},
|
|
680
|
+
"portfolio:fills": {
|
|
681
|
+
"aliases": [],
|
|
682
|
+
"args": {},
|
|
683
|
+
"description": "View trade history (fills)",
|
|
684
|
+
"examples": [
|
|
685
|
+
"<%= config.bin %> <%= command.id %>",
|
|
686
|
+
"<%= config.bin %> <%= command.id %> --ticker TICKER",
|
|
687
|
+
"<%= config.bin %> <%= command.id %> --limit 20",
|
|
688
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
689
|
+
],
|
|
690
|
+
"flags": {
|
|
691
|
+
"json": {
|
|
692
|
+
"description": "Output in JSON format",
|
|
693
|
+
"name": "json",
|
|
694
|
+
"allowNo": false,
|
|
695
|
+
"type": "boolean"
|
|
696
|
+
},
|
|
697
|
+
"limit": {
|
|
698
|
+
"description": "Maximum number of fills to return",
|
|
699
|
+
"name": "limit",
|
|
700
|
+
"default": 50,
|
|
701
|
+
"hasDynamicHelp": false,
|
|
702
|
+
"multiple": false,
|
|
703
|
+
"type": "option"
|
|
704
|
+
},
|
|
705
|
+
"ticker": {
|
|
706
|
+
"description": "Filter by ticker",
|
|
707
|
+
"name": "ticker",
|
|
708
|
+
"hasDynamicHelp": false,
|
|
709
|
+
"multiple": false,
|
|
710
|
+
"type": "option"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"hasDynamicHelp": false,
|
|
714
|
+
"hiddenAliases": [],
|
|
715
|
+
"id": "portfolio:fills",
|
|
716
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
717
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
718
|
+
"pluginType": "core",
|
|
719
|
+
"strict": true,
|
|
720
|
+
"enableJsonFlag": false,
|
|
721
|
+
"isESM": true,
|
|
722
|
+
"relativePath": [
|
|
723
|
+
"dist",
|
|
724
|
+
"commands",
|
|
725
|
+
"portfolio",
|
|
726
|
+
"fills.js"
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
"portfolio:history": {
|
|
730
|
+
"aliases": [],
|
|
731
|
+
"args": {},
|
|
732
|
+
"description": "Historical performance analysis with time-series data",
|
|
733
|
+
"examples": [
|
|
734
|
+
"<%= config.bin %> <%= command.id %>",
|
|
735
|
+
"<%= config.bin %> <%= command.id %> --ticker MARKET-A",
|
|
736
|
+
"<%= config.bin %> <%= command.id %> --group-by week",
|
|
737
|
+
"<%= config.bin %> <%= command.id %> --min-ts 2026-01-01T00:00:00Z --max-ts 2026-02-01T00:00:00Z",
|
|
738
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
739
|
+
],
|
|
740
|
+
"flags": {
|
|
741
|
+
"json": {
|
|
742
|
+
"description": "Output in JSON format",
|
|
743
|
+
"name": "json",
|
|
744
|
+
"allowNo": false,
|
|
745
|
+
"type": "boolean"
|
|
746
|
+
},
|
|
747
|
+
"group-by": {
|
|
748
|
+
"description": "Time aggregation level",
|
|
749
|
+
"name": "group-by",
|
|
750
|
+
"default": "day",
|
|
751
|
+
"hasDynamicHelp": false,
|
|
752
|
+
"multiple": false,
|
|
753
|
+
"options": [
|
|
754
|
+
"day",
|
|
755
|
+
"week",
|
|
756
|
+
"month"
|
|
757
|
+
],
|
|
758
|
+
"type": "option"
|
|
759
|
+
},
|
|
760
|
+
"limit": {
|
|
761
|
+
"description": "Maximum fills to fetch (handles pagination)",
|
|
762
|
+
"name": "limit",
|
|
763
|
+
"default": 500,
|
|
764
|
+
"hasDynamicHelp": false,
|
|
765
|
+
"multiple": false,
|
|
766
|
+
"type": "option"
|
|
767
|
+
},
|
|
768
|
+
"max-ts": {
|
|
769
|
+
"description": "End date (ISO-8601 format)",
|
|
770
|
+
"name": "max-ts",
|
|
771
|
+
"hasDynamicHelp": false,
|
|
772
|
+
"multiple": false,
|
|
773
|
+
"type": "option"
|
|
774
|
+
},
|
|
775
|
+
"min-ts": {
|
|
776
|
+
"description": "Start date (ISO-8601 format)",
|
|
777
|
+
"name": "min-ts",
|
|
778
|
+
"hasDynamicHelp": false,
|
|
779
|
+
"multiple": false,
|
|
780
|
+
"type": "option"
|
|
781
|
+
},
|
|
782
|
+
"ticker": {
|
|
783
|
+
"description": "Filter by specific market ticker",
|
|
784
|
+
"name": "ticker",
|
|
785
|
+
"hasDynamicHelp": false,
|
|
786
|
+
"multiple": false,
|
|
787
|
+
"type": "option"
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
"hasDynamicHelp": false,
|
|
791
|
+
"hiddenAliases": [],
|
|
792
|
+
"id": "portfolio:history",
|
|
793
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
794
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
795
|
+
"pluginType": "core",
|
|
796
|
+
"strict": true,
|
|
797
|
+
"enableJsonFlag": false,
|
|
798
|
+
"isESM": true,
|
|
799
|
+
"relativePath": [
|
|
800
|
+
"dist",
|
|
801
|
+
"commands",
|
|
802
|
+
"portfolio",
|
|
803
|
+
"history.js"
|
|
804
|
+
]
|
|
805
|
+
},
|
|
806
|
+
"portfolio:positions": {
|
|
807
|
+
"aliases": [],
|
|
808
|
+
"args": {},
|
|
809
|
+
"description": "View current positions with P&L",
|
|
810
|
+
"examples": [
|
|
811
|
+
"<%= config.bin %> <%= command.id %>",
|
|
812
|
+
"<%= config.bin %> <%= command.id %> --settlement-status open",
|
|
813
|
+
"<%= config.bin %> <%= command.id %> --settlement-status settled",
|
|
814
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
815
|
+
],
|
|
816
|
+
"flags": {
|
|
817
|
+
"json": {
|
|
818
|
+
"description": "Output in JSON format",
|
|
819
|
+
"name": "json",
|
|
820
|
+
"allowNo": false,
|
|
821
|
+
"type": "boolean"
|
|
822
|
+
},
|
|
823
|
+
"settlement-status": {
|
|
824
|
+
"description": "Filter by settlement status",
|
|
825
|
+
"name": "settlement-status",
|
|
826
|
+
"hasDynamicHelp": false,
|
|
827
|
+
"multiple": false,
|
|
828
|
+
"options": [
|
|
829
|
+
"open",
|
|
830
|
+
"pending",
|
|
831
|
+
"settled"
|
|
832
|
+
],
|
|
833
|
+
"type": "option"
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"hasDynamicHelp": false,
|
|
837
|
+
"hiddenAliases": [],
|
|
838
|
+
"id": "portfolio:positions",
|
|
839
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
840
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
841
|
+
"pluginType": "core",
|
|
842
|
+
"strict": true,
|
|
843
|
+
"enableJsonFlag": false,
|
|
844
|
+
"isESM": true,
|
|
845
|
+
"relativePath": [
|
|
846
|
+
"dist",
|
|
847
|
+
"commands",
|
|
514
848
|
"portfolio",
|
|
515
849
|
"positions.js"
|
|
516
850
|
]
|
|
851
|
+
},
|
|
852
|
+
"portfolio:risk": {
|
|
853
|
+
"aliases": [],
|
|
854
|
+
"args": {},
|
|
855
|
+
"description": "Real-time portfolio risk analysis and warnings",
|
|
856
|
+
"examples": [
|
|
857
|
+
"<%= config.bin %> <%= command.id %>",
|
|
858
|
+
"<%= config.bin %> <%= command.id %> --threshold 15",
|
|
859
|
+
"<%= config.bin %> <%= command.id %> --group-by event",
|
|
860
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
861
|
+
],
|
|
862
|
+
"flags": {
|
|
863
|
+
"json": {
|
|
864
|
+
"description": "Output in JSON format",
|
|
865
|
+
"name": "json",
|
|
866
|
+
"allowNo": false,
|
|
867
|
+
"type": "boolean"
|
|
868
|
+
},
|
|
869
|
+
"group-by": {
|
|
870
|
+
"description": "Grouping for concentration analysis",
|
|
871
|
+
"name": "group-by",
|
|
872
|
+
"default": "ticker",
|
|
873
|
+
"hasDynamicHelp": false,
|
|
874
|
+
"multiple": false,
|
|
875
|
+
"options": [
|
|
876
|
+
"event",
|
|
877
|
+
"series",
|
|
878
|
+
"ticker"
|
|
879
|
+
],
|
|
880
|
+
"type": "option"
|
|
881
|
+
},
|
|
882
|
+
"threshold": {
|
|
883
|
+
"description": "Alert threshold for position concentration (%)",
|
|
884
|
+
"name": "threshold",
|
|
885
|
+
"default": 20,
|
|
886
|
+
"hasDynamicHelp": false,
|
|
887
|
+
"multiple": false,
|
|
888
|
+
"type": "option"
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
"hasDynamicHelp": false,
|
|
892
|
+
"hiddenAliases": [],
|
|
893
|
+
"id": "portfolio:risk",
|
|
894
|
+
"pluginAlias": "@gaberoo/kalshitools",
|
|
895
|
+
"pluginName": "@gaberoo/kalshitools",
|
|
896
|
+
"pluginType": "core",
|
|
897
|
+
"strict": true,
|
|
898
|
+
"enableJsonFlag": false,
|
|
899
|
+
"isESM": true,
|
|
900
|
+
"relativePath": [
|
|
901
|
+
"dist",
|
|
902
|
+
"commands",
|
|
903
|
+
"portfolio",
|
|
904
|
+
"risk.js"
|
|
905
|
+
]
|
|
517
906
|
}
|
|
518
907
|
},
|
|
519
|
-
"version": "1.0
|
|
908
|
+
"version": "1.1.0"
|
|
520
909
|
}
|