@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.
- package/dist/catalog/generated/registry.json +479 -42
- package/dist/catalog/generated/schemas.json +6772 -9136
- package/dist/catalog/omit.d.ts +5 -2
- package/dist/catalog/omit.js +10 -3
- package/dist/engine-backtest/run-command.js +3 -3
- package/dist/engine-backtest/sweep-command.js +4 -4
- package/dist/engine-backtest/web-ui-config-defaults.d.ts +10 -0
- package/dist/engine-backtest/web-ui-config-defaults.js +46 -0
- package/dist/skills-manifest.json +44 -44
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/account/SKILL.md +1 -1
- package/skills/admin/SKILL.md +1 -1
- package/skills/alphafox/SKILL.md +8 -7
- package/skills/alphafox-shared/SKILL.md +18 -2
- package/skills/auth/SKILL.md +1 -1
- package/skills/cache/SKILL.md +1 -1
- package/skills/engine-backtest/SKILL.md +8 -8
- package/skills/exchange/SKILL.md +1 -1
- package/skills/market/SKILL.md +1 -1
- package/skills/notification/SKILL.md +1 -1
- package/skills/strategy/SKILL.md +3 -3
- package/skills/trading/SKILL.md +16 -4
package/skills/trading/SKILL.md
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
|
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
|
|