@alphafox/cli 0.3.6 → 0.3.8

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.
@@ -1,14 +1,26 @@
1
1
  ---
2
2
  name: alphafox-trading
3
- description: Traders list and high-risk start/stop with confirmation gates.
4
- version: 0.3.6
3
+ description: Running strategies (traders) — create, list, start, and stop. A trader is a live or paper strategy instance (grid, dca, copy, …), not a person.
4
+ version: 0.3.8
5
5
  ---
6
6
 
7
- # Trading
7
+ # Running strategies (traders)
8
8
 
9
- Always `--format json --no-input`. Read first. Writes need scopes `trading:write`; start/stop also `trading:high-risk`.
9
+ Always `--format json --no-input`. Read first. Creates and updates need `trading:write`; start/stop also `trading:high-risk`.
10
10
 
11
- Human-mentioned tickers must be resolved with `alphafox resolve-symbols` (`skills/market`) before they are written into trader config.
11
+ A **trader** is a running strategy instance (paper or live). Creating a strategy means creating a trader. Bind it to a **strategy definition**, an exchange connector, and runtime settings.
12
+
13
+ Human-mentioned tickers must be resolved with `alphafox resolve-symbols` (`skills/market`) before they are written into trader config. 美股 stay `equity_perp` contracts such as `NVDA/USDT:USDT`.
14
+
15
+ Pick the create operation from the definition the operator asked for:
16
+
17
+ | Kind | Create |
18
+ |---|---|
19
+ | Engine definitions (grid, dca, …) | `trading.traders.create` |
20
+ | Hyperliquid copy | `trading.hl_copy_traders.create` |
21
+ | Rebate copy | `trading.rebate_copy_traders.create` |
22
+
23
+ Copy leads come from `trading.signal_sources.list` when the operator named one. Same trader lifecycle (list / start / stop) after create.
12
24
 
13
25
  ## Read
14
26
 
@@ -16,9 +28,23 @@ Human-mentioned tickers must be resolved with `alphafox resolve-symbols` (`skill
16
28
  alphafox api GET /api/v1/trading/traders --format json --no-input
17
29
  ```
18
30
 
19
- ## High-risk write
31
+ ## Create
32
+
33
+ Read `alphafox schema <operationId>` first. Body may only include documented `request.body` fields. Large / nested bodies use `--config @file`.
34
+
35
+ ```bash
36
+ alphafox schema trading.traders.create --format json --no-input
37
+ alphafox trading traders create --config @./create-trader.json --dry-run --format json --no-input
38
+ alphafox trading traders create --config @./create-trader.json --yes --format json --no-input
39
+ ```
40
+
41
+ `trading.traders.create` is `high-risk-write` and needs `--yes`. Copy creates follow whatever `risk` the schema reports — `--dry-run` first, then `--yes` when required.
42
+
43
+ If a required field is missing, re-read the schema and ask the operator. Do not invent ids. The CLI has no authoring-session surface; instantiate from a definition, connector, and config.
44
+
45
+ ## High-risk start / stop
20
46
 
21
- Read `alphafox schema trading.traders.byId.start` first. Body may only include documented fields (`reason` is optional). Do not invent keys.
47
+ Read `alphafox schema trading.traders.byId.start` first. Body may only include documented fields (`reason` is optional).
22
48
 
23
49
  ```bash
24
50
  alphafox schema trading.traders.byId.start --format json --no-input
@@ -39,5 +65,9 @@ Stop: `POST /api/v1/trading/traders/{traderId}/stop` with the same `--dry-run` t
39
65
  ## operationIds
40
66
 
41
67
  - `trading.traders.list`
68
+ - `trading.traders.create`
69
+ - `trading.hl_copy_traders.create`
70
+ - `trading.rebate_copy_traders.create`
71
+ - `trading.signal_sources.list`
42
72
  - `trading.traders.byId.start`
43
73
  - `trading.traders.byId.stop`