massive-cli 0.0.1 → 0.0.2
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 +17 -18
- package/dist/cli.js +7 -7
- package/package.json +1 -1
- package/dist/SKILL.md +0 -55
- package/dist/references/crypto_commands.md +0 -142
- package/dist/references/forex_commands.md +0 -237
- package/dist/references/indices_commands.md +0 -174
- package/dist/references/market_commands.md +0 -37
- package/dist/references/news_commands.md +0 -33
- package/dist/references/options_commands.md +0 -258
- package/dist/references/reference_commands.md +0 -216
- package/dist/references/stocks_commands.md +0 -273
package/README.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
# Polygon
|
|
1
|
+
# Massive(Polygon) API CLI
|
|
2
2
|
|
|
3
|
-
A CLI tool for accessing [Polygon
|
|
3
|
+
A CLI tool for accessing [Massive(Polygon)](https://massive.com) financial data (Stocks, Crypto, Forex, Options, Indices) using [Bun](https://bun.sh).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Via NPX (Recommended)
|
|
8
|
+
|
|
9
|
+
Run commands directly without installing:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx massive <command> [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Local Installation
|
|
6
16
|
|
|
7
17
|
1. **Install Dependencies:**
|
|
8
18
|
```bash
|
|
@@ -10,7 +20,10 @@ A CLI tool for accessing [Polygon.io](https://polygon.io) financial data (Stocks
|
|
|
10
20
|
```
|
|
11
21
|
|
|
12
22
|
2. **Configure API Key:**
|
|
13
|
-
|
|
23
|
+
```bash
|
|
24
|
+
export POLY_API_KEY=your_api_key_here
|
|
25
|
+
```
|
|
26
|
+
or create a .env file in the root directory:
|
|
14
27
|
```
|
|
15
28
|
POLY_API_KEY=your_api_key_here
|
|
16
29
|
```
|
|
@@ -20,20 +33,6 @@ A CLI tool for accessing [Polygon.io](https://polygon.io) financial data (Stocks
|
|
|
20
33
|
bun run build
|
|
21
34
|
```
|
|
22
35
|
This generates the bundled CLI in `dist/cli.js`.
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
### Via NPX (Recommended)
|
|
27
|
-
|
|
28
|
-
Run commands directly without installing:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx massive <command> [options]
|
|
32
|
-
```
|
|
33
|
-
*(Requires Bun to be installed)*
|
|
34
|
-
|
|
35
|
-
### Local Installation
|
|
36
|
-
|
|
37
36
|
Run commands using the built CLI:
|
|
38
37
|
|
|
39
38
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -20504,9 +20504,9 @@ var COMMANDS = {
|
|
|
20504
20504
|
...newsCommands
|
|
20505
20505
|
};
|
|
20506
20506
|
function showHelp() {
|
|
20507
|
-
console.log(`
|
|
20507
|
+
console.log(`massive - Massive Market Data CLI
|
|
20508
20508
|
`);
|
|
20509
|
-
console.log(`Usage:
|
|
20509
|
+
console.log(`Usage: npx massive <command> [options]
|
|
20510
20510
|
`);
|
|
20511
20511
|
console.log("Commands:");
|
|
20512
20512
|
const maxLen = Math.max(...Object.keys(COMMANDS).map((k) => k.length));
|
|
@@ -20553,19 +20553,19 @@ function showHelp() {
|
|
|
20553
20553
|
console.log(` ${name.padEnd(maxLen + 2)} ${desc}`);
|
|
20554
20554
|
}
|
|
20555
20555
|
}
|
|
20556
|
-
console.log("Use '
|
|
20557
|
-
console.log("Set
|
|
20556
|
+
console.log("Use 'npx massive <command> --help' for command-specific options.");
|
|
20557
|
+
console.log("Set MASSIVE_API_KEY in .env or environment.");
|
|
20558
20558
|
}
|
|
20559
20559
|
function showCommandHelp(command) {
|
|
20560
20560
|
const cmd = COMMANDS[command];
|
|
20561
20561
|
if (!cmd) {
|
|
20562
20562
|
console.error(`Unknown command: ${command}`);
|
|
20563
|
-
console.error("Run '
|
|
20563
|
+
console.error("Run 'npx massive help' to see available commands.");
|
|
20564
20564
|
process.exit(1);
|
|
20565
20565
|
}
|
|
20566
20566
|
console.log(`${command} - ${cmd.desc}`);
|
|
20567
20567
|
console.log(`
|
|
20568
|
-
Usage:
|
|
20568
|
+
Usage: npx massive ${command} ${cmd.usage}`);
|
|
20569
20569
|
}
|
|
20570
20570
|
async function main() {
|
|
20571
20571
|
const { command, flags } = parseArgs(process.argv.slice(2));
|
|
@@ -20580,7 +20580,7 @@ async function main() {
|
|
|
20580
20580
|
const cmd = COMMANDS[command];
|
|
20581
20581
|
if (!cmd) {
|
|
20582
20582
|
console.error(`Unknown command: ${command}`);
|
|
20583
|
-
console.error("Run '
|
|
20583
|
+
console.error("Run 'npx massive help' to see available commands.");
|
|
20584
20584
|
process.exit(1);
|
|
20585
20585
|
}
|
|
20586
20586
|
try {
|
package/package.json
CHANGED
package/dist/SKILL.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: polygon-api
|
|
3
|
-
description: Access Polygon/Massive stock, crypto, forex, options, indices, futures, market data, and news APIs via CLI.
|
|
4
|
-
metadata:
|
|
5
|
-
openclaw:
|
|
6
|
-
requires:
|
|
7
|
-
bins: ["bun"]
|
|
8
|
-
env: ["POLY_API_KEY"]
|
|
9
|
-
primaryEnv: "POLY_API_KEY"
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Polygon (Massive) Market Data Skill
|
|
13
|
-
|
|
14
|
-
A CLI tool and JS client wrapper for the [Polygon/Massive](https://massive.com) financial data APIs. Covers stocks, crypto, forex, options, indices, futures, market status, news, and reference data.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## CLI Usage
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
bun cli.js <command> [options]
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
All commands output JSON to stdout. Use `--help` for a list of commands or `<command> --help` for command-specific options.
|
|
24
|
-
|
|
25
|
-
### Stocks
|
|
26
|
-
|
|
27
|
-
See [Stocks Commands Reference](references/stocks_commands.md) for full details on all stock commands and parameters.
|
|
28
|
-
|
|
29
|
-
### Crypto
|
|
30
|
-
|
|
31
|
-
See [Crypto Commands Reference](references/crypto_commands.md) for full details on all crypto commands and parameters.
|
|
32
|
-
|
|
33
|
-
### Forex
|
|
34
|
-
|
|
35
|
-
See [Forex Commands Reference](references/forex_commands.md) for full details on all forex commands and parameters.
|
|
36
|
-
|
|
37
|
-
### Options
|
|
38
|
-
|
|
39
|
-
See [Options Commands Reference](references/options_commands.md) for full details on all options commands and parameters.
|
|
40
|
-
|
|
41
|
-
### Indices
|
|
42
|
-
|
|
43
|
-
See [Indices Commands Reference](references/indices_commands.md) for full details on all indices commands and parameters.
|
|
44
|
-
|
|
45
|
-
### Reference Data
|
|
46
|
-
|
|
47
|
-
See [Reference Data Commands Reference](references/reference_commands.md) for full details on all reference data commands and parameters.
|
|
48
|
-
|
|
49
|
-
### Market
|
|
50
|
-
|
|
51
|
-
See [Market Commands Reference](references/market_commands.md) for full details on all market commands and parameters.
|
|
52
|
-
|
|
53
|
-
### News
|
|
54
|
-
|
|
55
|
-
See [News Commands Reference](references/news_commands.md) for full details on all news commands and parameters.
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Crypto Commands Reference
|
|
2
|
-
|
|
3
|
-
This document provides details on the parameters and enums used in the Polygon/Massive Crypto CLI commands.
|
|
4
|
-
|
|
5
|
-
## Enums
|
|
6
|
-
|
|
7
|
-
### Timespans
|
|
8
|
-
Used in `crypto-aggs`, `crypto-sma`, `crypto-ema`, `crypto-rsi`, `crypto-macd`:
|
|
9
|
-
- **GetCryptoAggregatesTimespanEnum**: `second`, `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`
|
|
10
|
-
- **GetCryptoSMATimespanEnum**: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`
|
|
11
|
-
- **GetCryptoEMATimespanEnum**: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`
|
|
12
|
-
- **GetCryptoRSITimespanEnum**: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`
|
|
13
|
-
- **GetCryptoMACDTimespanEnum**: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`
|
|
14
|
-
|
|
15
|
-
### Series Type
|
|
16
|
-
Used in technical indicators (`crypto-sma`, `crypto-ema`, `crypto-rsi`, `crypto-macd`) to specify which price to use:
|
|
17
|
-
- `open`, `high`, `low`, `close`
|
|
18
|
-
|
|
19
|
-
### Order / Sort
|
|
20
|
-
- **Sort**: `asc` (ascending), `desc` (descending)
|
|
21
|
-
- **Order**: `asc`, `desc`
|
|
22
|
-
- **Crypto Trades Sort**: `timestamp`
|
|
23
|
-
|
|
24
|
-
### Snapshot Direction
|
|
25
|
-
- `gainers`, `losers`
|
|
26
|
-
|
|
27
|
-
## Commands and Parameters
|
|
28
|
-
|
|
29
|
-
### `crypto-aggs`
|
|
30
|
-
- `ticker` (string, required): Crypto ticker (e.g., X:BTCUSD)
|
|
31
|
-
- `multiplier` (number): Timespan multiplier (default 1)
|
|
32
|
-
- `timespan` (enum): See Timespans above (default 'day')
|
|
33
|
-
- `from` (string, required): Start date (YYYY-MM-DD)
|
|
34
|
-
- `to` (string, required): End date (YYYY-MM-DD)
|
|
35
|
-
- `adjusted` (boolean): Adjust for splits (default true)
|
|
36
|
-
- `sort` (enum): Sort order (default 'asc')
|
|
37
|
-
- `limit` (number): Max results (default 120)
|
|
38
|
-
|
|
39
|
-
**Example**:
|
|
40
|
-
```bash
|
|
41
|
-
bun cli.js crypto-aggs --ticker X:BTCUSD --from 2023-01-01 --to 2023-01-31 --timespan day
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### `crypto-trades`
|
|
45
|
-
- `ticker` (string, required): Crypto ticker
|
|
46
|
-
- `timestamp` (string): Specific timestamp
|
|
47
|
-
- `timestamp-gte`, `timestamp-gt`, `timestamp-lte`, `timestamp-lt`: Timestamp range filters
|
|
48
|
-
- `order` (enum): Order of results
|
|
49
|
-
- `limit` (number): Max results
|
|
50
|
-
- `sort` (enum): Sort field
|
|
51
|
-
|
|
52
|
-
**Example**:
|
|
53
|
-
```bash
|
|
54
|
-
bun cli.js crypto-trades --ticker X:BTCUSD --limit 5
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### `crypto-snapshot`
|
|
58
|
-
- `ticker` (string, required): Crypto ticker
|
|
59
|
-
|
|
60
|
-
**Example**:
|
|
61
|
-
```bash
|
|
62
|
-
bun cli.js crypto-snapshot --ticker X:BTCUSD
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### `crypto-snapshot-direction`
|
|
66
|
-
- `direction` (enum, required): `gainers` or `losers`
|
|
67
|
-
|
|
68
|
-
**Example**:
|
|
69
|
-
```bash
|
|
70
|
-
bun cli.js crypto-snapshot-direction --direction gainers
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### `crypto-snapshot-tickers`
|
|
74
|
-
- `tickers` (comma-separated strings): List of tickers
|
|
75
|
-
|
|
76
|
-
**Example**:
|
|
77
|
-
```bash
|
|
78
|
-
bun cli.js crypto-snapshot-tickers --tickers X:BTCUSD,X:ETHUSD
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### `crypto-open-close`
|
|
82
|
-
- `from` (string, required): From symbol (e.g., BTC)
|
|
83
|
-
- `to` (string, required): To symbol (e.g., USD)
|
|
84
|
-
- `date` (string, required): Date (YYYY-MM-DD)
|
|
85
|
-
- `adjusted` (boolean): Adjust for splits
|
|
86
|
-
|
|
87
|
-
**Example**:
|
|
88
|
-
```bash
|
|
89
|
-
bun cli.js crypto-open-close --from BTC --to USD --date 2023-01-01
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### `crypto-previous`
|
|
93
|
-
- `ticker` (string, required): Crypto ticker
|
|
94
|
-
- `adjusted` (boolean): Adjust for splits
|
|
95
|
-
|
|
96
|
-
**Example**:
|
|
97
|
-
```bash
|
|
98
|
-
bun cli.js crypto-previous --ticker X:BTCUSD
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### `crypto-grouped`
|
|
102
|
-
- `date` (string, required): Date (YYYY-MM-DD)
|
|
103
|
-
- `adjusted` (boolean): Adjust for splits
|
|
104
|
-
|
|
105
|
-
**Example**:
|
|
106
|
-
```bash
|
|
107
|
-
bun cli.js crypto-grouped --date 2023-01-01
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Technical Indicators (`crypto-sma`, `crypto-ema`, `crypto-rsi`, `crypto-macd`)
|
|
111
|
-
Common parameters:
|
|
112
|
-
- `ticker` (string, required)
|
|
113
|
-
- `timespan` (enum)
|
|
114
|
-
- `window` (number)
|
|
115
|
-
- `series-type` (enum)
|
|
116
|
-
- `expand-underlying` (boolean)
|
|
117
|
-
- `order` (enum)
|
|
118
|
-
- `limit` (number)
|
|
119
|
-
- Timestamp filters: `timestamp`, `timestamp-gte`, `timestamp-gt`, `timestamp-lte`, `timestamp-lt`
|
|
120
|
-
|
|
121
|
-
Specific to `crypto-macd`:
|
|
122
|
-
- `short-window` (number)
|
|
123
|
-
- `long-window` (number)
|
|
124
|
-
- `signal-window` (number)
|
|
125
|
-
|
|
126
|
-
**Example**:
|
|
127
|
-
```bash
|
|
128
|
-
# SMA
|
|
129
|
-
bun cli.js crypto-sma --ticker X:BTCUSD --timespan day --window 50
|
|
130
|
-
|
|
131
|
-
# MACD
|
|
132
|
-
bun cli.js crypto-macd --ticker X:BTCUSD --timespan day --short-window 12 --long-window 26 --signal-window 9
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### `last-crypto-trade`
|
|
136
|
-
- `from` (string, required)
|
|
137
|
-
- `to` (string, required)
|
|
138
|
-
|
|
139
|
-
**Example**:
|
|
140
|
-
```bash
|
|
141
|
-
bun cli.js last-crypto-trade --from BTC --to USD
|
|
142
|
-
```
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# Forex Commands Reference
|
|
2
|
-
|
|
3
|
-
This document provides a reference for the forex-related commands available in the Polygon CLI.
|
|
4
|
-
|
|
5
|
-
## Commands
|
|
6
|
-
|
|
7
|
-
### forex-aggs
|
|
8
|
-
Get aggregate bars (OHLCV) for a forex pair over a given date range.
|
|
9
|
-
|
|
10
|
-
**Usage:**
|
|
11
|
-
```bash
|
|
12
|
-
bun cli.js forex-aggs --ticker <ticker> --from <YYYY-MM-DD> --to <YYYY-MM-DD> [options]
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Parameters:**
|
|
16
|
-
- `--ticker` (required): Forex ticker symbol (e.g., C:EURUSD).
|
|
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 forex-aggs --ticker C:EURUSD --from 2025-01-01 --to 2025-01-31 --timespan day --limit 10
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### forex-quotes
|
|
31
|
-
Get quotes for a forex pair.
|
|
32
|
-
|
|
33
|
-
**Usage:**
|
|
34
|
-
```bash
|
|
35
|
-
bun cli.js forex-quotes --ticker <ticker> [options]
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Parameters:**
|
|
39
|
-
- `--ticker` (required): Forex 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 forex-quotes --ticker C:EURUSD --limit 5
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### forex-snapshot
|
|
52
|
-
Get the most recent snapshot for a forex pair.
|
|
53
|
-
|
|
54
|
-
**Usage:**
|
|
55
|
-
```bash
|
|
56
|
-
bun cli.js forex-snapshot --ticker <ticker>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**Parameters:**
|
|
60
|
-
- `--ticker` (required): Forex ticker symbol.
|
|
61
|
-
|
|
62
|
-
**Example:**
|
|
63
|
-
```bash
|
|
64
|
-
bun cli.js forex-snapshot --ticker C:EURUSD
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### forex-previous
|
|
68
|
-
Get the previous day's open, high, low, and close (OHLC) for a forex pair.
|
|
69
|
-
|
|
70
|
-
**Usage:**
|
|
71
|
-
```bash
|
|
72
|
-
bun cli.js forex-previous --ticker <ticker> [options]
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Parameters:**
|
|
76
|
-
- `--ticker` (required): Forex ticker symbol.
|
|
77
|
-
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
78
|
-
|
|
79
|
-
**Example:**
|
|
80
|
-
```bash
|
|
81
|
-
bun cli.js forex-previous --ticker C:EURUSD
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### forex-grouped
|
|
85
|
-
Get the daily open, high, low, and close (OHLC) for the entire forex market.
|
|
86
|
-
|
|
87
|
-
**Usage:**
|
|
88
|
-
```bash
|
|
89
|
-
bun cli.js forex-grouped --date <YYYY-MM-DD> [options]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
**Parameters:**
|
|
93
|
-
- `--date` (required): Date of the requested aggregates (YYYY-MM-DD).
|
|
94
|
-
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
95
|
-
|
|
96
|
-
**Example:**
|
|
97
|
-
```bash
|
|
98
|
-
bun cli.js forex-grouped --date 2025-01-15
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### forex-sma
|
|
102
|
-
Get Simple Moving Average (SMA) for a forex pair.
|
|
103
|
-
|
|
104
|
-
**Usage:**
|
|
105
|
-
```bash
|
|
106
|
-
bun cli.js forex-sma --ticker <ticker> [options]
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**Parameters:**
|
|
110
|
-
- `--ticker` (required): Forex ticker symbol.
|
|
111
|
-
- `--timestamp` (string): Query by specific timestamp.
|
|
112
|
-
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
113
|
-
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
114
|
-
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
115
|
-
- `--window` (number): Window size (default: 50).
|
|
116
|
-
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
117
|
-
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
118
|
-
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
119
|
-
- `--limit` (number): Max results (default: 10).
|
|
120
|
-
|
|
121
|
-
**Example:**
|
|
122
|
-
```bash
|
|
123
|
-
bun cli.js forex-sma --ticker C:EURUSD --window 50
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### forex-ema
|
|
127
|
-
Get Exponential Moving Average (EMA) for a forex pair.
|
|
128
|
-
|
|
129
|
-
**Usage:**
|
|
130
|
-
```bash
|
|
131
|
-
bun cli.js forex-ema --ticker <ticker> [options]
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**Parameters:**
|
|
135
|
-
- `--ticker` (required): Forex ticker symbol.
|
|
136
|
-
- `--timestamp` (string): Query by specific timestamp.
|
|
137
|
-
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
138
|
-
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
139
|
-
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
140
|
-
- `--window` (number): Window size (default: 50).
|
|
141
|
-
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
142
|
-
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
143
|
-
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
144
|
-
- `--limit` (number): Max results (default: 10).
|
|
145
|
-
|
|
146
|
-
**Example:**
|
|
147
|
-
```bash
|
|
148
|
-
bun cli.js forex-ema --ticker C:EURUSD --window 50
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### forex-rsi
|
|
152
|
-
Get Relative Strength Index (RSI) for a forex pair.
|
|
153
|
-
|
|
154
|
-
**Usage:**
|
|
155
|
-
```bash
|
|
156
|
-
bun cli.js forex-rsi --ticker <ticker> [options]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Parameters:**
|
|
160
|
-
- `--ticker` (required): Forex ticker symbol.
|
|
161
|
-
- `--timestamp` (string): Query by specific timestamp.
|
|
162
|
-
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
163
|
-
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
164
|
-
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
165
|
-
- `--window` (number): Window size (default: 14).
|
|
166
|
-
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
167
|
-
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
168
|
-
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
169
|
-
- `--limit` (number): Max results (default: 10).
|
|
170
|
-
|
|
171
|
-
**Example:**
|
|
172
|
-
```bash
|
|
173
|
-
bun cli.js forex-rsi --ticker C:EURUSD --window 14
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### forex-macd
|
|
177
|
-
Get Moving Average Convergence/Divergence (MACD) for a forex pair.
|
|
178
|
-
|
|
179
|
-
**Usage:**
|
|
180
|
-
```bash
|
|
181
|
-
bun cli.js forex-macd --ticker <ticker> [options]
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**Parameters:**
|
|
185
|
-
- `--ticker` (required): Forex ticker symbol.
|
|
186
|
-
- `--timestamp` (string): Query by specific timestamp.
|
|
187
|
-
- `--timestamp-gte`, `--timestamp-gt`, `--timestamp-lte`, `--timestamp-lt` (string): Timestamp range filters.
|
|
188
|
-
- `--timespan` (string): Timespan unit (default: 'day'). Values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
189
|
-
- `--adjusted` (boolean): Whether to adjust for splits (default: true).
|
|
190
|
-
- `--short-window` (number): Short window size.
|
|
191
|
-
- `--long-window` (number): Long window size.
|
|
192
|
-
- `--signal-window` (number): Signal window size.
|
|
193
|
-
- `--series-type` (string): Price type to use. Values: `open`, `high`, `low`, `close`.
|
|
194
|
-
- `--expand-underlying` (boolean): Include underlying aggregates.
|
|
195
|
-
- `--order` (string): Sort order. Values: `asc`, `desc`.
|
|
196
|
-
- `--limit` (number): Max results (default: 10).
|
|
197
|
-
|
|
198
|
-
**Example:**
|
|
199
|
-
```bash
|
|
200
|
-
bun cli.js forex-macd --ticker C:EURUSD
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### currency-conversion
|
|
204
|
-
Get currency conversion.
|
|
205
|
-
|
|
206
|
-
**Usage:**
|
|
207
|
-
```bash
|
|
208
|
-
bun cli.js currency-conversion --from <currency> --to <currency> [options]
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
**Parameters:**
|
|
212
|
-
- `--from` (required): From currency (e.g., USD).
|
|
213
|
-
- `--to` (required): To currency (e.g., EUR).
|
|
214
|
-
- `--amount` (number): Amount to convert.
|
|
215
|
-
- `--precision` (number): Decimal precision.
|
|
216
|
-
|
|
217
|
-
**Example:**
|
|
218
|
-
```bash
|
|
219
|
-
bun cli.js currency-conversion --from USD --to EUR --amount 100
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### last-forex-quote
|
|
223
|
-
Get the last quote for a forex pair.
|
|
224
|
-
|
|
225
|
-
**Usage:**
|
|
226
|
-
```bash
|
|
227
|
-
bun cli.js last-forex-quote --from <currency> --to <currency>
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
**Parameters:**
|
|
231
|
-
- `--from` (required): From currency (e.g., EUR).
|
|
232
|
-
- `--to` (required): To currency (e.g., USD).
|
|
233
|
-
|
|
234
|
-
**Example:**
|
|
235
|
-
```bash
|
|
236
|
-
bun cli.js last-forex-quote --from EUR --to USD
|
|
237
|
-
```
|