@gaberoo/kalshitools 1.0.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 +666 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +5 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +5 -0
- package/dist/commands/config/init.d.ts +13 -0
- package/dist/commands/config/init.js +89 -0
- package/dist/commands/config/show.d.ts +10 -0
- package/dist/commands/config/show.js +77 -0
- package/dist/commands/markets/list.d.ts +11 -0
- package/dist/commands/markets/list.js +64 -0
- package/dist/commands/markets/show.d.ts +13 -0
- package/dist/commands/markets/show.js +79 -0
- package/dist/commands/orders/cancel.d.ts +14 -0
- package/dist/commands/orders/cancel.js +129 -0
- package/dist/commands/orders/create.d.ts +19 -0
- package/dist/commands/orders/create.js +211 -0
- package/dist/commands/orders/list.d.ts +13 -0
- package/dist/commands/orders/list.js +92 -0
- package/dist/commands/portfolio/balance.d.ts +9 -0
- package/dist/commands/portfolio/balance.js +36 -0
- package/dist/commands/portfolio/fills.d.ts +11 -0
- package/dist/commands/portfolio/fills.js +80 -0
- package/dist/commands/portfolio/positions.d.ts +9 -0
- package/dist/commands/portfolio/positions.js +58 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/base-command.d.ts +13 -0
- package/dist/lib/base-command.js +38 -0
- package/dist/lib/config/manager.d.ts +71 -0
- package/dist/lib/config/manager.js +137 -0
- package/dist/lib/config/schema.d.ts +175 -0
- package/dist/lib/config/schema.js +59 -0
- package/dist/lib/errors/base.d.ts +84 -0
- package/dist/lib/errors/base.js +106 -0
- package/dist/lib/kalshi/auth.d.ts +17 -0
- package/dist/lib/kalshi/auth.js +71 -0
- package/dist/lib/kalshi/client.d.ts +86 -0
- package/dist/lib/kalshi/client.js +228 -0
- package/dist/lib/kalshi/index.d.ts +8 -0
- package/dist/lib/kalshi/index.js +19 -0
- package/dist/lib/kalshi/types.d.ts +155 -0
- package/dist/lib/kalshi/types.js +4 -0
- package/dist/lib/logger.d.ts +9 -0
- package/dist/lib/logger.js +41 -0
- package/dist/lib/output/formatter.d.ts +69 -0
- package/dist/lib/output/formatter.js +111 -0
- package/dist/lib/retry.d.ts +18 -0
- package/dist/lib/retry.js +81 -0
- package/dist/lib/sanitize.d.ts +28 -0
- package/dist/lib/sanitize.js +124 -0
- package/dist/lib/shutdown.d.ts +43 -0
- package/dist/lib/shutdown.js +106 -0
- package/dist/lib/validation.d.ts +37 -0
- package/dist/lib/validation.js +120 -0
- package/oclif.manifest.json +520 -0
- package/package.json +98 -0
package/README.md
ADDED
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
# kalshitools
|
|
2
|
+
|
|
3
|
+
A powerful CLI tool for interacting with the Kalshi prediction markets API. Built for traders, automated systems, and AI agents.
|
|
4
|
+
|
|
5
|
+
[](https://oclif.io)
|
|
6
|
+
[](https://npmjs.org/package/kalshitools)
|
|
7
|
+
[](https://github.com/kalshitools/kalshitools/blob/main/package.json)
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- 🔐 **Secure Authentication**: RSA-PSS based authentication with secure credential storage
|
|
12
|
+
- 📊 **Market Data**: Browse and query prediction markets (coming soon)
|
|
13
|
+
- 💼 **Portfolio Management**: View balances and positions (coming soon)
|
|
14
|
+
- 📈 **Trading**: Place and manage orders with safety features (coming soon)
|
|
15
|
+
- 🤖 **AI-Friendly**: Structured JSON output for automated systems
|
|
16
|
+
- 🛡️ **Safety First**: Demo environment default, confirmations, and order limits
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Initialize configuration
|
|
22
|
+
kalshitools config init
|
|
23
|
+
|
|
24
|
+
# Verify configuration
|
|
25
|
+
kalshitools config show
|
|
26
|
+
|
|
27
|
+
# Get JSON output
|
|
28
|
+
kalshitools config show --json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
Configuration is stored at `~/.config/kalshitools/config.json` and can be overridden with environment variables:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
export KALSHI_ENV=demo
|
|
37
|
+
export KALSHI_API_KEY_ID=your-email@example.com
|
|
38
|
+
export KALSHI_PRIVATE_KEY_PATH=~/.kalshitools/demo-private-key.pem
|
|
39
|
+
export LOG_LEVEL=info
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
<!-- toc -->
|
|
43
|
+
* [kalshitools](#kalshitools)
|
|
44
|
+
* [Initialize configuration](#initialize-configuration)
|
|
45
|
+
* [Verify configuration](#verify-configuration)
|
|
46
|
+
* [Get JSON output](#get-json-output)
|
|
47
|
+
* [Usage](#usage)
|
|
48
|
+
* [Commands](#commands)
|
|
49
|
+
<!-- tocstop -->
|
|
50
|
+
# Usage
|
|
51
|
+
<!-- usage -->
|
|
52
|
+
```sh-session
|
|
53
|
+
$ npm install -g @gaberoo/kalshitools
|
|
54
|
+
$ kalshitools COMMAND
|
|
55
|
+
running command...
|
|
56
|
+
$ kalshitools (--version)
|
|
57
|
+
@gaberoo/kalshitools/1.0.0 darwin-arm64 node-v22.20.0
|
|
58
|
+
$ kalshitools --help [COMMAND]
|
|
59
|
+
USAGE
|
|
60
|
+
$ kalshitools COMMAND
|
|
61
|
+
...
|
|
62
|
+
```
|
|
63
|
+
<!-- usagestop -->
|
|
64
|
+
# Commands
|
|
65
|
+
<!-- commands -->
|
|
66
|
+
* [`kalshitools config init`](#kalshitools-config-init)
|
|
67
|
+
* [`kalshitools config show`](#kalshitools-config-show)
|
|
68
|
+
* [`kalshitools help [COMMAND]`](#kalshitools-help-command)
|
|
69
|
+
* [`kalshitools markets list`](#kalshitools-markets-list)
|
|
70
|
+
* [`kalshitools markets show TICKER`](#kalshitools-markets-show-ticker)
|
|
71
|
+
* [`kalshitools orders cancel ORDERID`](#kalshitools-orders-cancel-orderid)
|
|
72
|
+
* [`kalshitools orders create`](#kalshitools-orders-create)
|
|
73
|
+
* [`kalshitools orders list`](#kalshitools-orders-list)
|
|
74
|
+
* [`kalshitools plugins`](#kalshitools-plugins)
|
|
75
|
+
* [`kalshitools plugins add PLUGIN`](#kalshitools-plugins-add-plugin)
|
|
76
|
+
* [`kalshitools plugins:inspect PLUGIN...`](#kalshitools-pluginsinspect-plugin)
|
|
77
|
+
* [`kalshitools plugins install PLUGIN`](#kalshitools-plugins-install-plugin)
|
|
78
|
+
* [`kalshitools plugins link PATH`](#kalshitools-plugins-link-path)
|
|
79
|
+
* [`kalshitools plugins remove [PLUGIN]`](#kalshitools-plugins-remove-plugin)
|
|
80
|
+
* [`kalshitools plugins reset`](#kalshitools-plugins-reset)
|
|
81
|
+
* [`kalshitools plugins uninstall [PLUGIN]`](#kalshitools-plugins-uninstall-plugin)
|
|
82
|
+
* [`kalshitools plugins unlink [PLUGIN]`](#kalshitools-plugins-unlink-plugin)
|
|
83
|
+
* [`kalshitools plugins update`](#kalshitools-plugins-update)
|
|
84
|
+
* [`kalshitools portfolio balance`](#kalshitools-portfolio-balance)
|
|
85
|
+
* [`kalshitools portfolio fills`](#kalshitools-portfolio-fills)
|
|
86
|
+
* [`kalshitools portfolio positions`](#kalshitools-portfolio-positions)
|
|
87
|
+
|
|
88
|
+
## `kalshitools config init`
|
|
89
|
+
|
|
90
|
+
Initialize kalshitools configuration interactively
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
USAGE
|
|
94
|
+
$ kalshitools config init [--json] [--env demo|production] [--keyId <value>] [--privateKeyPath <value>]
|
|
95
|
+
|
|
96
|
+
FLAGS
|
|
97
|
+
--env=<option> [default: demo] Environment to configure (demo or production)
|
|
98
|
+
<options: demo|production>
|
|
99
|
+
--json Output in JSON format
|
|
100
|
+
--keyId=<value> API key ID (email)
|
|
101
|
+
--privateKeyPath=<value> Path to private key file
|
|
102
|
+
|
|
103
|
+
DESCRIPTION
|
|
104
|
+
Initialize kalshitools configuration interactively
|
|
105
|
+
|
|
106
|
+
EXAMPLES
|
|
107
|
+
$ kalshitools config init
|
|
108
|
+
|
|
109
|
+
$ kalshitools config init --env production
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
_See code: [src/commands/config/init.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/config/init.ts)_
|
|
113
|
+
|
|
114
|
+
## `kalshitools config show`
|
|
115
|
+
|
|
116
|
+
Show current configuration (credentials redacted)
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
USAGE
|
|
120
|
+
$ kalshitools config show [--json]
|
|
121
|
+
|
|
122
|
+
FLAGS
|
|
123
|
+
--json Output in JSON format
|
|
124
|
+
|
|
125
|
+
DESCRIPTION
|
|
126
|
+
Show current configuration (credentials redacted)
|
|
127
|
+
|
|
128
|
+
EXAMPLES
|
|
129
|
+
$ kalshitools config show
|
|
130
|
+
|
|
131
|
+
$ kalshitools config show --json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
_See code: [src/commands/config/show.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/config/show.ts)_
|
|
135
|
+
|
|
136
|
+
## `kalshitools help [COMMAND]`
|
|
137
|
+
|
|
138
|
+
Display help for kalshitools.
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
USAGE
|
|
142
|
+
$ kalshitools help [COMMAND...] [-n]
|
|
143
|
+
|
|
144
|
+
ARGUMENTS
|
|
145
|
+
[COMMAND...] Command to show help for.
|
|
146
|
+
|
|
147
|
+
FLAGS
|
|
148
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
149
|
+
|
|
150
|
+
DESCRIPTION
|
|
151
|
+
Display help for kalshitools.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.37/src/commands/help.ts)_
|
|
155
|
+
|
|
156
|
+
## `kalshitools markets list`
|
|
157
|
+
|
|
158
|
+
List prediction markets
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
USAGE
|
|
162
|
+
$ kalshitools markets list [--json] [--status active|closed|settled|finalized] [--limit <value>]
|
|
163
|
+
|
|
164
|
+
FLAGS
|
|
165
|
+
--json Output in JSON format
|
|
166
|
+
--limit=<value> [default: 20] Maximum number of markets to return
|
|
167
|
+
--status=<option> Filter by market status
|
|
168
|
+
<options: active|closed|settled|finalized>
|
|
169
|
+
|
|
170
|
+
DESCRIPTION
|
|
171
|
+
List prediction markets
|
|
172
|
+
|
|
173
|
+
EXAMPLES
|
|
174
|
+
$ kalshitools markets list
|
|
175
|
+
|
|
176
|
+
$ kalshitools markets list --status active --limit 10
|
|
177
|
+
|
|
178
|
+
$ kalshitools markets list --json
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
_See code: [src/commands/markets/list.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/markets/list.ts)_
|
|
182
|
+
|
|
183
|
+
## `kalshitools markets show TICKER`
|
|
184
|
+
|
|
185
|
+
Show market details
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
USAGE
|
|
189
|
+
$ kalshitools markets show TICKER [--json]
|
|
190
|
+
|
|
191
|
+
ARGUMENTS
|
|
192
|
+
TICKER Market ticker symbol
|
|
193
|
+
|
|
194
|
+
FLAGS
|
|
195
|
+
--json Output in JSON format
|
|
196
|
+
|
|
197
|
+
DESCRIPTION
|
|
198
|
+
Show market details
|
|
199
|
+
|
|
200
|
+
EXAMPLES
|
|
201
|
+
$ kalshitools markets show TICKER
|
|
202
|
+
|
|
203
|
+
$ kalshitools markets show TICKER --json
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
_See code: [src/commands/markets/show.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/markets/show.ts)_
|
|
207
|
+
|
|
208
|
+
## `kalshitools orders cancel ORDERID`
|
|
209
|
+
|
|
210
|
+
Cancel an order
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
USAGE
|
|
214
|
+
$ kalshitools orders cancel ORDERID [--json] [-y]
|
|
215
|
+
|
|
216
|
+
ARGUMENTS
|
|
217
|
+
ORDERID Order ID to cancel
|
|
218
|
+
|
|
219
|
+
FLAGS
|
|
220
|
+
-y, --yes Skip confirmation prompt
|
|
221
|
+
--json Output in JSON format
|
|
222
|
+
|
|
223
|
+
DESCRIPTION
|
|
224
|
+
Cancel an order
|
|
225
|
+
|
|
226
|
+
EXAMPLES
|
|
227
|
+
$ kalshitools orders cancel ORDER_ID
|
|
228
|
+
|
|
229
|
+
$ kalshitools orders cancel ORDER_ID --yes
|
|
230
|
+
|
|
231
|
+
$ kalshitools orders cancel ORDER_ID --json
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
_See code: [src/commands/orders/cancel.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/orders/cancel.ts)_
|
|
235
|
+
|
|
236
|
+
## `kalshitools orders create`
|
|
237
|
+
|
|
238
|
+
Create a new order (buy or sell contracts)
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
USAGE
|
|
242
|
+
$ kalshitools orders create -t <value> -a buy|sell -s yes|no -q <value> [--json] [--type market|limit] [-p
|
|
243
|
+
<value>] [-y] [--dry-run]
|
|
244
|
+
|
|
245
|
+
FLAGS
|
|
246
|
+
-a, --action=<option> (required) Order action (buy or sell)
|
|
247
|
+
<options: buy|sell>
|
|
248
|
+
-p, --price=<value> Limit price (required for limit orders, 0.01-0.99)
|
|
249
|
+
-q, --quantity=<value> (required) Number of contracts
|
|
250
|
+
-s, --side=<option> (required) Contract side (yes or no)
|
|
251
|
+
<options: yes|no>
|
|
252
|
+
-t, --ticker=<value> (required) Market ticker symbol
|
|
253
|
+
-y, --yes Skip confirmation prompt
|
|
254
|
+
--dry-run Simulate the order without actually placing it
|
|
255
|
+
--json Output in JSON format
|
|
256
|
+
--type=<option> [default: market] Order type (market or limit)
|
|
257
|
+
<options: market|limit>
|
|
258
|
+
|
|
259
|
+
DESCRIPTION
|
|
260
|
+
Create a new order (buy or sell contracts)
|
|
261
|
+
|
|
262
|
+
EXAMPLES
|
|
263
|
+
$ kalshitools orders create --ticker TICKER --action buy --side yes --quantity 10 --type market
|
|
264
|
+
|
|
265
|
+
$ kalshitools orders create --ticker TICKER --action buy --side yes --quantity 10 --type limit --price 0.65
|
|
266
|
+
|
|
267
|
+
$ kalshitools orders create --ticker TICKER --action sell --side no --quantity 5 --type market --yes
|
|
268
|
+
|
|
269
|
+
$ kalshitools orders create --ticker TICKER --action buy --side yes --quantity 100 --dry-run
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
_See code: [src/commands/orders/create.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/orders/create.ts)_
|
|
273
|
+
|
|
274
|
+
## `kalshitools orders list`
|
|
275
|
+
|
|
276
|
+
List orders
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
USAGE
|
|
280
|
+
$ kalshitools orders list [--json] [--status pending|resting|canceled|executed|expired] [--ticker <value>]
|
|
281
|
+
[--limit <value>]
|
|
282
|
+
|
|
283
|
+
FLAGS
|
|
284
|
+
--json Output in JSON format
|
|
285
|
+
--limit=<value> [default: 50] Maximum number of orders to return
|
|
286
|
+
--status=<option> Filter by order status
|
|
287
|
+
<options: pending|resting|canceled|executed|expired>
|
|
288
|
+
--ticker=<value> Filter by ticker
|
|
289
|
+
|
|
290
|
+
DESCRIPTION
|
|
291
|
+
List orders
|
|
292
|
+
|
|
293
|
+
EXAMPLES
|
|
294
|
+
$ kalshitools orders list
|
|
295
|
+
|
|
296
|
+
$ kalshitools orders list --status resting
|
|
297
|
+
|
|
298
|
+
$ kalshitools orders list --ticker TICKER
|
|
299
|
+
|
|
300
|
+
$ kalshitools orders list --json
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
_See code: [src/commands/orders/list.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/orders/list.ts)_
|
|
304
|
+
|
|
305
|
+
## `kalshitools plugins`
|
|
306
|
+
|
|
307
|
+
List installed plugins.
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
USAGE
|
|
311
|
+
$ kalshitools plugins [--json] [--core]
|
|
312
|
+
|
|
313
|
+
FLAGS
|
|
314
|
+
--core Show core plugins.
|
|
315
|
+
|
|
316
|
+
GLOBAL FLAGS
|
|
317
|
+
--json Format output as json.
|
|
318
|
+
|
|
319
|
+
DESCRIPTION
|
|
320
|
+
List installed plugins.
|
|
321
|
+
|
|
322
|
+
EXAMPLES
|
|
323
|
+
$ kalshitools plugins
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/index.ts)_
|
|
327
|
+
|
|
328
|
+
## `kalshitools plugins add PLUGIN`
|
|
329
|
+
|
|
330
|
+
Installs a plugin into kalshitools.
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
USAGE
|
|
334
|
+
$ kalshitools plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
|
|
335
|
+
|
|
336
|
+
ARGUMENTS
|
|
337
|
+
PLUGIN... Plugin to install.
|
|
338
|
+
|
|
339
|
+
FLAGS
|
|
340
|
+
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
|
|
341
|
+
-h, --help Show CLI help.
|
|
342
|
+
-s, --silent Silences npm output.
|
|
343
|
+
-v, --verbose Show verbose npm output.
|
|
344
|
+
|
|
345
|
+
GLOBAL FLAGS
|
|
346
|
+
--json Format output as json.
|
|
347
|
+
|
|
348
|
+
DESCRIPTION
|
|
349
|
+
Installs a plugin into kalshitools.
|
|
350
|
+
|
|
351
|
+
Uses npm to install plugins.
|
|
352
|
+
|
|
353
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
354
|
+
|
|
355
|
+
Use the KALSHITOOLS_NPM_LOG_LEVEL environment variable to set the npm loglevel.
|
|
356
|
+
Use the KALSHITOOLS_NPM_REGISTRY environment variable to set the npm registry.
|
|
357
|
+
|
|
358
|
+
ALIASES
|
|
359
|
+
$ kalshitools plugins add
|
|
360
|
+
|
|
361
|
+
EXAMPLES
|
|
362
|
+
Install a plugin from npm registry.
|
|
363
|
+
|
|
364
|
+
$ kalshitools plugins add myplugin
|
|
365
|
+
|
|
366
|
+
Install a plugin from a github url.
|
|
367
|
+
|
|
368
|
+
$ kalshitools plugins add https://github.com/someuser/someplugin
|
|
369
|
+
|
|
370
|
+
Install a plugin from a github slug.
|
|
371
|
+
|
|
372
|
+
$ kalshitools plugins add someuser/someplugin
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## `kalshitools plugins:inspect PLUGIN...`
|
|
376
|
+
|
|
377
|
+
Displays installation properties of a plugin.
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
USAGE
|
|
381
|
+
$ kalshitools plugins inspect PLUGIN...
|
|
382
|
+
|
|
383
|
+
ARGUMENTS
|
|
384
|
+
PLUGIN... [default: .] Plugin to inspect.
|
|
385
|
+
|
|
386
|
+
FLAGS
|
|
387
|
+
-h, --help Show CLI help.
|
|
388
|
+
-v, --verbose
|
|
389
|
+
|
|
390
|
+
GLOBAL FLAGS
|
|
391
|
+
--json Format output as json.
|
|
392
|
+
|
|
393
|
+
DESCRIPTION
|
|
394
|
+
Displays installation properties of a plugin.
|
|
395
|
+
|
|
396
|
+
EXAMPLES
|
|
397
|
+
$ kalshitools plugins inspect myplugin
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/inspect.ts)_
|
|
401
|
+
|
|
402
|
+
## `kalshitools plugins install PLUGIN`
|
|
403
|
+
|
|
404
|
+
Installs a plugin into kalshitools.
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
USAGE
|
|
408
|
+
$ kalshitools plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
|
|
409
|
+
|
|
410
|
+
ARGUMENTS
|
|
411
|
+
PLUGIN... Plugin to install.
|
|
412
|
+
|
|
413
|
+
FLAGS
|
|
414
|
+
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
|
|
415
|
+
-h, --help Show CLI help.
|
|
416
|
+
-s, --silent Silences npm output.
|
|
417
|
+
-v, --verbose Show verbose npm output.
|
|
418
|
+
|
|
419
|
+
GLOBAL FLAGS
|
|
420
|
+
--json Format output as json.
|
|
421
|
+
|
|
422
|
+
DESCRIPTION
|
|
423
|
+
Installs a plugin into kalshitools.
|
|
424
|
+
|
|
425
|
+
Uses npm to install plugins.
|
|
426
|
+
|
|
427
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
428
|
+
|
|
429
|
+
Use the KALSHITOOLS_NPM_LOG_LEVEL environment variable to set the npm loglevel.
|
|
430
|
+
Use the KALSHITOOLS_NPM_REGISTRY environment variable to set the npm registry.
|
|
431
|
+
|
|
432
|
+
ALIASES
|
|
433
|
+
$ kalshitools plugins add
|
|
434
|
+
|
|
435
|
+
EXAMPLES
|
|
436
|
+
Install a plugin from npm registry.
|
|
437
|
+
|
|
438
|
+
$ kalshitools plugins install myplugin
|
|
439
|
+
|
|
440
|
+
Install a plugin from a github url.
|
|
441
|
+
|
|
442
|
+
$ kalshitools plugins install https://github.com/someuser/someplugin
|
|
443
|
+
|
|
444
|
+
Install a plugin from a github slug.
|
|
445
|
+
|
|
446
|
+
$ kalshitools plugins install someuser/someplugin
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/install.ts)_
|
|
450
|
+
|
|
451
|
+
## `kalshitools plugins link PATH`
|
|
452
|
+
|
|
453
|
+
Links a plugin into the CLI for development.
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
USAGE
|
|
457
|
+
$ kalshitools plugins link PATH [-h] [--install] [-v]
|
|
458
|
+
|
|
459
|
+
ARGUMENTS
|
|
460
|
+
PATH [default: .] path to plugin
|
|
461
|
+
|
|
462
|
+
FLAGS
|
|
463
|
+
-h, --help Show CLI help.
|
|
464
|
+
-v, --verbose
|
|
465
|
+
--[no-]install Install dependencies after linking the plugin.
|
|
466
|
+
|
|
467
|
+
DESCRIPTION
|
|
468
|
+
Links a plugin into the CLI for development.
|
|
469
|
+
|
|
470
|
+
Installation of a linked plugin will override a user-installed or core plugin.
|
|
471
|
+
|
|
472
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
473
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
EXAMPLES
|
|
477
|
+
$ kalshitools plugins link myplugin
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/link.ts)_
|
|
481
|
+
|
|
482
|
+
## `kalshitools plugins remove [PLUGIN]`
|
|
483
|
+
|
|
484
|
+
Removes a plugin from the CLI.
|
|
485
|
+
|
|
486
|
+
```
|
|
487
|
+
USAGE
|
|
488
|
+
$ kalshitools plugins remove [PLUGIN...] [-h] [-v]
|
|
489
|
+
|
|
490
|
+
ARGUMENTS
|
|
491
|
+
[PLUGIN...] plugin to uninstall
|
|
492
|
+
|
|
493
|
+
FLAGS
|
|
494
|
+
-h, --help Show CLI help.
|
|
495
|
+
-v, --verbose
|
|
496
|
+
|
|
497
|
+
DESCRIPTION
|
|
498
|
+
Removes a plugin from the CLI.
|
|
499
|
+
|
|
500
|
+
ALIASES
|
|
501
|
+
$ kalshitools plugins unlink
|
|
502
|
+
$ kalshitools plugins remove
|
|
503
|
+
|
|
504
|
+
EXAMPLES
|
|
505
|
+
$ kalshitools plugins remove myplugin
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
## `kalshitools plugins reset`
|
|
509
|
+
|
|
510
|
+
Remove all user-installed and linked plugins.
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
USAGE
|
|
514
|
+
$ kalshitools plugins reset [--hard] [--reinstall]
|
|
515
|
+
|
|
516
|
+
FLAGS
|
|
517
|
+
--hard Delete node_modules and package manager related files in addition to uninstalling plugins.
|
|
518
|
+
--reinstall Reinstall all plugins after uninstalling.
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/reset.ts)_
|
|
522
|
+
|
|
523
|
+
## `kalshitools plugins uninstall [PLUGIN]`
|
|
524
|
+
|
|
525
|
+
Removes a plugin from the CLI.
|
|
526
|
+
|
|
527
|
+
```
|
|
528
|
+
USAGE
|
|
529
|
+
$ kalshitools plugins uninstall [PLUGIN...] [-h] [-v]
|
|
530
|
+
|
|
531
|
+
ARGUMENTS
|
|
532
|
+
[PLUGIN...] plugin to uninstall
|
|
533
|
+
|
|
534
|
+
FLAGS
|
|
535
|
+
-h, --help Show CLI help.
|
|
536
|
+
-v, --verbose
|
|
537
|
+
|
|
538
|
+
DESCRIPTION
|
|
539
|
+
Removes a plugin from the CLI.
|
|
540
|
+
|
|
541
|
+
ALIASES
|
|
542
|
+
$ kalshitools plugins unlink
|
|
543
|
+
$ kalshitools plugins remove
|
|
544
|
+
|
|
545
|
+
EXAMPLES
|
|
546
|
+
$ kalshitools plugins uninstall myplugin
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/uninstall.ts)_
|
|
550
|
+
|
|
551
|
+
## `kalshitools plugins unlink [PLUGIN]`
|
|
552
|
+
|
|
553
|
+
Removes a plugin from the CLI.
|
|
554
|
+
|
|
555
|
+
```
|
|
556
|
+
USAGE
|
|
557
|
+
$ kalshitools plugins unlink [PLUGIN...] [-h] [-v]
|
|
558
|
+
|
|
559
|
+
ARGUMENTS
|
|
560
|
+
[PLUGIN...] plugin to uninstall
|
|
561
|
+
|
|
562
|
+
FLAGS
|
|
563
|
+
-h, --help Show CLI help.
|
|
564
|
+
-v, --verbose
|
|
565
|
+
|
|
566
|
+
DESCRIPTION
|
|
567
|
+
Removes a plugin from the CLI.
|
|
568
|
+
|
|
569
|
+
ALIASES
|
|
570
|
+
$ kalshitools plugins unlink
|
|
571
|
+
$ kalshitools plugins remove
|
|
572
|
+
|
|
573
|
+
EXAMPLES
|
|
574
|
+
$ kalshitools plugins unlink myplugin
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
## `kalshitools plugins update`
|
|
578
|
+
|
|
579
|
+
Update installed plugins.
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
USAGE
|
|
583
|
+
$ kalshitools plugins update [-h] [-v]
|
|
584
|
+
|
|
585
|
+
FLAGS
|
|
586
|
+
-h, --help Show CLI help.
|
|
587
|
+
-v, --verbose
|
|
588
|
+
|
|
589
|
+
DESCRIPTION
|
|
590
|
+
Update installed plugins.
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/update.ts)_
|
|
594
|
+
|
|
595
|
+
## `kalshitools portfolio balance`
|
|
596
|
+
|
|
597
|
+
View account balance
|
|
598
|
+
|
|
599
|
+
```
|
|
600
|
+
USAGE
|
|
601
|
+
$ kalshitools portfolio balance [--json]
|
|
602
|
+
|
|
603
|
+
FLAGS
|
|
604
|
+
--json Output in JSON format
|
|
605
|
+
|
|
606
|
+
DESCRIPTION
|
|
607
|
+
View account balance
|
|
608
|
+
|
|
609
|
+
EXAMPLES
|
|
610
|
+
$ kalshitools portfolio balance
|
|
611
|
+
|
|
612
|
+
$ kalshitools portfolio balance --json
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
_See code: [src/commands/portfolio/balance.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/portfolio/balance.ts)_
|
|
616
|
+
|
|
617
|
+
## `kalshitools portfolio fills`
|
|
618
|
+
|
|
619
|
+
View trade history (fills)
|
|
620
|
+
|
|
621
|
+
```
|
|
622
|
+
USAGE
|
|
623
|
+
$ kalshitools portfolio fills [--json] [--ticker <value>] [--limit <value>]
|
|
624
|
+
|
|
625
|
+
FLAGS
|
|
626
|
+
--json Output in JSON format
|
|
627
|
+
--limit=<value> [default: 50] Maximum number of fills to return
|
|
628
|
+
--ticker=<value> Filter by ticker
|
|
629
|
+
|
|
630
|
+
DESCRIPTION
|
|
631
|
+
View trade history (fills)
|
|
632
|
+
|
|
633
|
+
EXAMPLES
|
|
634
|
+
$ kalshitools portfolio fills
|
|
635
|
+
|
|
636
|
+
$ kalshitools portfolio fills --ticker TICKER
|
|
637
|
+
|
|
638
|
+
$ kalshitools portfolio fills --limit 20
|
|
639
|
+
|
|
640
|
+
$ kalshitools portfolio fills --json
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
_See code: [src/commands/portfolio/fills.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/portfolio/fills.ts)_
|
|
644
|
+
|
|
645
|
+
## `kalshitools portfolio positions`
|
|
646
|
+
|
|
647
|
+
View current positions with P&L
|
|
648
|
+
|
|
649
|
+
```
|
|
650
|
+
USAGE
|
|
651
|
+
$ kalshitools portfolio positions [--json]
|
|
652
|
+
|
|
653
|
+
FLAGS
|
|
654
|
+
--json Output in JSON format
|
|
655
|
+
|
|
656
|
+
DESCRIPTION
|
|
657
|
+
View current positions with P&L
|
|
658
|
+
|
|
659
|
+
EXAMPLES
|
|
660
|
+
$ kalshitools portfolio positions
|
|
661
|
+
|
|
662
|
+
$ kalshitools portfolio positions --json
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
_See code: [src/commands/portfolio/positions.ts](https://github.com/kalshitools/kalshitools/blob/v1.0.0/src/commands/portfolio/positions.ts)_
|
|
666
|
+
<!-- commandsstop -->
|
package/bin/dev.cmd
ADDED
package/bin/dev.js
ADDED
package/bin/run.cmd
ADDED
package/bin/run.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../lib/base-command.js';
|
|
2
|
+
export default class ConfigInit extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
env: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
keyId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
privateKeyPath: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
private promptForInput;
|
|
13
|
+
}
|