massive-cli 0.0.1
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 +63 -0
- package/dist/SKILL.md +55 -0
- package/dist/cli.js +20593 -0
- package/dist/references/crypto_commands.md +142 -0
- package/dist/references/forex_commands.md +237 -0
- package/dist/references/indices_commands.md +174 -0
- package/dist/references/market_commands.md +37 -0
- package/dist/references/news_commands.md +33 -0
- package/dist/references/options_commands.md +258 -0
- package/dist/references/reference_commands.md +216 -0
- package/dist/references/stocks_commands.md +273 -0
- package/package.json +27 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Stocks Commands Reference
|
|
2
|
+
|
|
3
|
+
This document provides a reference for the stock-related commands available in the Polygon CLI.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
### stocks-aggs
|
|
8
|
+
Get aggregate bars (OHLCV) for a stock over a given date range.
|
|
9
|
+
|
|
10
|
+
**Usage:**
|
|
11
|
+
```bash
|
|
12
|
+
bun cli.js stocks-aggs --ticker <ticker> --from <YYYY-MM-DD> --to <YYYY-MM-DD> [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Parameters:**
|
|
16
|
+
- `--ticker` (required): Stock ticker symbol (e.g., AAPL).
|
|
17
|
+
- `--from` (required): Start date (YYYY-MM-DD).
|
|
18
|
+
- `--to` (required): End date (YYYY-MM-DD).
|
|
19
|
+
- `--multiplier` (number): Timespan multiplier (default: 1).
|
|
20
|
+
- `--timespan` (string): Timespan unit (default: 'day'). Values: `second`, `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
21
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
22
|
+
- `--sort` (string): Sort order (default: 'asc'). Values: `asc`, `desc`.
|
|
23
|
+
- `--limit` (number): Max results (default: 120).
|
|
24
|
+
|
|
25
|
+
**Example:**
|
|
26
|
+
```bash
|
|
27
|
+
bun cli.js stocks-aggs --ticker AAPL --from 2023-01-01 --to 2023-01-31 --timespan day --limit 10
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### stocks-trades
|
|
31
|
+
Get trades for a stock ticker.
|
|
32
|
+
|
|
33
|
+
**Usage:**
|
|
34
|
+
```bash
|
|
35
|
+
bun cli.js stocks-trades --ticker <ticker> [options]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Parameters:**
|
|
39
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
40
|
+
- `--timestamp` (string): Query by specific timestamp.
|
|
41
|
+
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
42
|
+
- `--limit` (number): Max results (default: 10).
|
|
43
|
+
- `--sort` (string): Sort field (default: 'timestamp'). Values: `timestamp`.
|
|
44
|
+
- `--order` (string): Sort order (default: 'asc'). Values: `asc`, `desc`.
|
|
45
|
+
|
|
46
|
+
**Example:**
|
|
47
|
+
```bash
|
|
48
|
+
bun cli.js stocks-trades --ticker AAPL --limit 5
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### stocks-quotes
|
|
52
|
+
Get NBBO quotes for a stock ticker.
|
|
53
|
+
|
|
54
|
+
**Usage:**
|
|
55
|
+
```bash
|
|
56
|
+
bun cli.js stocks-quotes --ticker <ticker> [options]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Parameters:**
|
|
60
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
61
|
+
- `--timestamp` (string): Query by specific timestamp.
|
|
62
|
+
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
63
|
+
- `--limit` (number): Max results (default: 10).
|
|
64
|
+
- `--sort` (string): Sort field (default: 'timestamp'). Values: `timestamp`.
|
|
65
|
+
- `--order` (string): Sort order (default: 'asc'). Values: `asc`, `desc`.
|
|
66
|
+
|
|
67
|
+
**Example:**
|
|
68
|
+
```bash
|
|
69
|
+
bun cli.js stocks-quotes --ticker AAPL --limit 5
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### stocks-snapshot
|
|
73
|
+
Get the most recent snapshot for a stock ticker.
|
|
74
|
+
|
|
75
|
+
**Usage:**
|
|
76
|
+
```bash
|
|
77
|
+
bun cli.js stocks-snapshot --ticker <ticker>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Parameters:**
|
|
81
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
82
|
+
|
|
83
|
+
**Example:**
|
|
84
|
+
```bash
|
|
85
|
+
bun cli.js stocks-snapshot --ticker AAPL
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### stocks-open-close
|
|
89
|
+
Get the daily open, close, and after-hours prices for a stock ticker on a specific date.
|
|
90
|
+
|
|
91
|
+
**Usage:**
|
|
92
|
+
```bash
|
|
93
|
+
bun cli.js stocks-open-close --ticker <ticker> --date <YYYY-MM-DD> [options]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Parameters:**
|
|
97
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
98
|
+
- `--date` (required): Date of the requested open/close (YYYY-MM-DD).
|
|
99
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
100
|
+
|
|
101
|
+
**Example:**
|
|
102
|
+
```bash
|
|
103
|
+
bun cli.js stocks-open-close --ticker AAPL --date 2023-01-15
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### stocks-previous
|
|
107
|
+
Get the previous day's open, high, low, and close (OHLC) for a stock ticker.
|
|
108
|
+
|
|
109
|
+
**Usage:**
|
|
110
|
+
```bash
|
|
111
|
+
bun cli.js stocks-previous --ticker <ticker> [options]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Parameters:**
|
|
115
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
116
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
117
|
+
|
|
118
|
+
**Example:**
|
|
119
|
+
```bash
|
|
120
|
+
bun cli.js stocks-previous --ticker AAPL
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### stocks-grouped
|
|
124
|
+
Get the daily open, high, low, and close (OHLC) for the entire stocks market.
|
|
125
|
+
|
|
126
|
+
**Usage:**
|
|
127
|
+
```bash
|
|
128
|
+
bun cli.js stocks-grouped --date <YYYY-MM-DD> [options]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Parameters:**
|
|
132
|
+
- `--date` (required): Date of the requested aggregates (YYYY-MM-DD).
|
|
133
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
134
|
+
- `--include-otc` (boolean): Include OTC securities (default: false).
|
|
135
|
+
|
|
136
|
+
**Example:**
|
|
137
|
+
```bash
|
|
138
|
+
bun cli.js stocks-grouped --date 2023-01-15
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### stocks-sma
|
|
142
|
+
Get Simple Moving Average (SMA) for a stock ticker.
|
|
143
|
+
|
|
144
|
+
**Usage:**
|
|
145
|
+
```bash
|
|
146
|
+
bun cli.js stocks-sma --ticker <ticker> [options]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Parameters:**
|
|
150
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
151
|
+
- `--timestamp` (string): Query by specific timestamp.
|
|
152
|
+
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
153
|
+
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
154
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
155
|
+
- `--window` (number): Window size (default: 50).
|
|
156
|
+
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
157
|
+
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
158
|
+
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
159
|
+
- `--limit` (number): Max results (default: 10).
|
|
160
|
+
|
|
161
|
+
**Example:**
|
|
162
|
+
```bash
|
|
163
|
+
bun cli.js stocks-sma --ticker AAPL --window 50
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### stocks-ema
|
|
167
|
+
Get Exponential Moving Average (EMA) for a stock ticker.
|
|
168
|
+
|
|
169
|
+
**Usage:**
|
|
170
|
+
```bash
|
|
171
|
+
bun cli.js stocks-ema --ticker <ticker> [options]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Parameters:**
|
|
175
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
176
|
+
- `--timestamp` (string): Query by specific timestamp.
|
|
177
|
+
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
178
|
+
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
179
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
180
|
+
- `--window` (number): Window size (default: 50).
|
|
181
|
+
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
182
|
+
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
183
|
+
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
184
|
+
- `--limit` (number): Max results (default: 10).
|
|
185
|
+
|
|
186
|
+
**Example:**
|
|
187
|
+
```bash
|
|
188
|
+
bun cli.js stocks-ema --ticker AAPL --window 50
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### stocks-rsi
|
|
192
|
+
Get Relative Strength Index (RSI) for a stock ticker.
|
|
193
|
+
|
|
194
|
+
**Usage:**
|
|
195
|
+
```bash
|
|
196
|
+
bun cli.js stocks-rsi --ticker <ticker> [options]
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Parameters:**
|
|
200
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
201
|
+
- `--timestamp` (string): Query by specific timestamp.
|
|
202
|
+
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
203
|
+
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
204
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
205
|
+
- `--window` (number): Window size (default: 14).
|
|
206
|
+
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
207
|
+
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
208
|
+
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
209
|
+
- `--limit` (number): Max results (default: 10).
|
|
210
|
+
|
|
211
|
+
**Example:**
|
|
212
|
+
```bash
|
|
213
|
+
bun cli.js stocks-rsi --ticker AAPL --window 14
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### stocks-macd
|
|
217
|
+
Get Moving Average Convergence/Divergence (MACD) for a stock ticker.
|
|
218
|
+
|
|
219
|
+
**Usage:**
|
|
220
|
+
```bash
|
|
221
|
+
bun cli.js stocks-macd --ticker <ticker> [options]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Parameters:**
|
|
225
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
226
|
+
- `--timestamp` (string): Query by specific timestamp.
|
|
227
|
+
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
228
|
+
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
229
|
+
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
230
|
+
- `--short-window` (number): Short window size.
|
|
231
|
+
- `--long-window` (number): Long window size.
|
|
232
|
+
- `--signal-window` (number): Signal window size.
|
|
233
|
+
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
234
|
+
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
235
|
+
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
236
|
+
- `--limit` (number): Max results (default: 10).
|
|
237
|
+
|
|
238
|
+
**Example:**
|
|
239
|
+
```bash
|
|
240
|
+
bun cli.js stocks-macd --ticker AAPL
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### last-trade
|
|
244
|
+
Get the most recent trade for a stock ticker.
|
|
245
|
+
|
|
246
|
+
**Usage:**
|
|
247
|
+
```bash
|
|
248
|
+
bun cli.js last-trade --ticker <ticker>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Parameters:**
|
|
252
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
253
|
+
|
|
254
|
+
**Example:**
|
|
255
|
+
```bash
|
|
256
|
+
bun cli.js last-trade --ticker AAPL
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### last-quote
|
|
260
|
+
Get the most recent quote (NBBO) for a stock ticker.
|
|
261
|
+
|
|
262
|
+
**Usage:**
|
|
263
|
+
```bash
|
|
264
|
+
bun cli.js last-quote --ticker <ticker>
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Parameters:**
|
|
268
|
+
- `--ticker` (required): Stock ticker symbol.
|
|
269
|
+
|
|
270
|
+
**Example:**
|
|
271
|
+
```bash
|
|
272
|
+
bun cli.js last-quote --ticker AAPL
|
|
273
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "massive-cli",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Polygon/Massive Market Data CLI",
|
|
5
|
+
"module": "index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"massive": "./dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "bun build src/cli.ts --outdir dist --target node",
|
|
15
|
+
"start": "bun dist/cli.js",
|
|
16
|
+
"prepublishOnly": "bun run build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@massive.com/client-js": "^10.3.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/bun": "latest"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"typescript": "^5"
|
|
26
|
+
}
|
|
27
|
+
}
|