@alphafox/cli 0.3.14 → 0.3.16

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,7 +1,7 @@
1
1
  ---
2
2
  name: alphafox-trading
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.14
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. Default Engine create uses autoStart true (创建即开始). Use autoStart false only when the user asks to create without starting. After create or start, include https://www.alphafox.app/zh/dashboard/traders/{traderId}.
4
+ version: 0.3.16
5
5
  ---
6
6
 
7
7
  # Running strategies (traders)
@@ -40,11 +40,17 @@ alphafox trading traders create --config @./create-trader.json --yes --format js
40
40
 
41
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
42
 
43
+ Default Engine create is **创建即开始**: set `autoStart` to `true` in the body. Omitting `autoStart` is not the same — the server treats a missing flag as do-not-start. Use `autoStart: false` only when the operator explicitly asks to create without starting (创建但不启动 / 暂时不开始 / 先创建不要跑). Do not create-then-`byId.start` as the default path.
44
+
45
+ After a successful create (or a later start), include the trader dashboard URL from `alphafox-shared` (`https://www.alphafox.app/zh/dashboard/traders/{traderId}`).
46
+
47
+ Create `config` must include `common.execution.leverage` unless the operator chose another value. Default **10**, matching the website form. Omitting it is not 10x — Engine uses **1x**.
48
+
43
49
  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
50
 
45
51
  ## High-risk start / stop
46
52
 
47
- Read `alphafox schema trading.traders.byId.start` first. Body may only include documented fields (`reason` is optional).
53
+ Read `alphafox schema trading.traders.byId.start` first. Start body is optional Engine fields (`startType`, `enableSLTPMonitoring`, `expectedCoverageType`). `{}` is valid. Do not send `reason`.
48
54
 
49
55
  ```bash
50
56
  alphafox schema trading.traders.byId.start --format json --no-input
@@ -54,7 +60,13 @@ alphafox trading traders byId start --traderId <id> --body '{}' --yes --format j
54
60
 
55
61
  Without `--yes`, CLI exits `10` with `confirmation_required`. Server still checks role/ownership.
56
62
 
57
- Stop: `POST /api/v1/trading/traders/{traderId}/stop` with the same `--dry-run` then `--yes` sequence.
63
+ Stop requires `closePositions` (boolean). Ask the operator whether to flatten positions. Do not default. Do not send `reason`.
64
+
65
+ ```bash
66
+ alphafox schema trading.traders.byId.stop --format json --no-input
67
+ alphafox trading traders byId stop --traderId <id> --body '{"closePositions":false}' --dry-run --format json --no-input
68
+ alphafox trading traders byId stop --traderId <id> --body '{"closePositions":false}' --yes --format json --no-input
69
+ ```
58
70
 
59
71
  ## Recovery
60
72