dexterm-cli 0.1.7 → 0.2.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/dist/packages/agents/src/spectator.js +31 -3
- package/dist/packages/agents/src/tiers.js +12 -0
- package/dist/packages/agents/src/tools.js +13 -5
- package/dist/packages/autotrade/assets/limits.schema.json +569 -0
- package/dist/packages/autotrade/examples/executor/README.md +70 -0
- package/dist/packages/autotrade/examples/executor/jsonl-tail-executor.mjs +57 -0
- package/dist/packages/autotrade/examples/executor/kit.mjs +144 -0
- package/dist/packages/autotrade/examples/executor/signal-cmd-executor.mjs +25 -0
- package/dist/packages/autotrade/examples/executor/telegram-bot-recipe.md +47 -0
- package/dist/packages/autotrade/examples/executor/webhook-executor.mjs +47 -0
- package/dist/packages/autotrade/src/backtest.js +7 -2
- package/dist/packages/autotrade/src/chat/config.js +4 -2
- package/dist/packages/autotrade/src/chat/control.js +1 -0
- package/dist/packages/autotrade/src/chat/notify.js +16 -6
- package/dist/packages/autotrade/src/chat/secrets.js +25 -18
- package/dist/packages/autotrade/src/chat/service.js +3 -0
- package/dist/packages/autotrade/src/engine.js +16 -2
- package/dist/packages/autotrade/src/executor-health.js +217 -0
- package/dist/packages/autotrade/src/fleet.js +5 -2
- package/dist/packages/autotrade/src/forward.js +355 -0
- package/dist/packages/autotrade/src/index.js +21 -0
- package/dist/packages/autotrade/src/journey.js +477 -0
- package/dist/packages/autotrade/src/limits.js +682 -0
- package/dist/packages/autotrade/src/outbox.js +394 -0
- package/dist/packages/autotrade/src/paper-limits.js +87 -0
- package/dist/packages/autotrade/src/real-mode.js +688 -0
- package/dist/packages/autotrade/src/receipts.js +330 -0
- package/dist/packages/autotrade/src/report.js +168 -0
- package/dist/packages/autotrade/src/rugproof-probe.js +415 -0
- package/dist/packages/autotrade/src/rugproof.js +231 -0
- package/dist/packages/autotrade/src/runner.js +194 -28
- package/dist/packages/autotrade/src/service-guard.js +125 -0
- package/dist/packages/autotrade/src/service-install.js +215 -0
- package/dist/packages/autotrade/src/service-recover.js +232 -0
- package/dist/packages/autotrade/src/service.js +289 -0
- package/dist/packages/autotrade/src/sessions.js +16 -7
- package/dist/packages/autotrade/src/signal-channels.js +312 -0
- package/dist/packages/autotrade/src/signal.js +196 -0
- package/dist/packages/autotrade/src/strategy-stats.js +344 -0
- package/dist/packages/autotrade/src/strategy.js +15 -2
- package/dist/packages/autotrade/src/trade-ledger.js +2 -2
- package/dist/packages/classifier/src/calibrate.js +138 -0
- package/dist/packages/classifier/src/classify.js +107 -0
- package/dist/packages/classifier/src/config.js +220 -0
- package/dist/packages/classifier/src/dossier.js +95 -0
- package/dist/packages/classifier/src/hardware.js +63 -0
- package/dist/packages/classifier/src/index.js +18 -0
- package/dist/packages/classifier/src/models.js +111 -0
- package/dist/packages/classifier/src/providers/heuristic.js +77 -0
- package/dist/packages/classifier/src/providers/http.js +63 -0
- package/dist/packages/classifier/src/providers/jev-open.js +86 -0
- package/dist/packages/classifier/src/providers/llm.js +89 -0
- package/dist/packages/classifier/src/providers/systemone-http.js +95 -0
- package/dist/packages/classifier/src/questions.js +97 -0
- package/dist/packages/classifier/src/registry.js +42 -0
- package/dist/packages/classifier/src/snapshot.js +31 -0
- package/dist/packages/classifier/src/systemone.js +88 -0
- package/dist/packages/classifier/src/types.js +18 -0
- package/dist/packages/cli/assets/dash/dash.css +139 -0
- package/dist/packages/cli/assets/dash/dash.js +200 -0
- package/dist/packages/cli/assets/dash/icon.svg +1 -0
- package/dist/packages/cli/assets/dash/index.html +36 -0
- package/dist/packages/cli/src/analyst/backend.js +3 -2
- package/dist/packages/cli/src/analyst/codex.js +3 -2
- package/dist/packages/cli/src/app-help-gen.js +26 -2
- package/dist/packages/cli/src/autotrade-cmd/audit.js +19 -2
- package/dist/packages/cli/src/autotrade-cmd/backtest.js +21 -4
- package/dist/packages/cli/src/autotrade-cmd/executor.js +91 -0
- package/dist/packages/cli/src/autotrade-cmd/fleet.js +16 -5
- package/dist/packages/cli/src/autotrade-cmd/forward.js +283 -0
- package/dist/packages/cli/src/autotrade-cmd/journey.js +208 -0
- package/dist/packages/cli/src/autotrade-cmd/limits.js +393 -0
- package/dist/packages/cli/src/autotrade-cmd/receipt.js +63 -0
- package/dist/packages/cli/src/autotrade-cmd/report.js +79 -0
- package/dist/packages/cli/src/autotrade-cmd/run.js +268 -14
- package/dist/packages/cli/src/autotrade-cmd/service.js +873 -0
- package/dist/packages/cli/src/autotrade-cmd/signal.js +824 -0
- package/dist/packages/cli/src/autotrade-cmd.js +50 -4
- package/dist/packages/cli/src/classifier-cmd.js +353 -0
- package/dist/packages/cli/src/classifier-live.js +81 -0
- package/dist/packages/cli/src/dash/data.js +217 -0
- package/dist/packages/cli/src/dash/server.js +92 -0
- package/dist/packages/cli/src/dash-cmd.js +113 -0
- package/dist/packages/cli/src/doctor.js +34 -0
- package/dist/packages/cli/src/ledger-cmd.js +4 -2
- package/dist/packages/cli/src/live/screens/token-live.js +4 -0
- package/dist/packages/cli/src/live/signals.js +8 -0
- package/dist/packages/cli/src/main.js +98 -6
- package/dist/packages/cli/src/mcp-follow.js +21 -1
- package/dist/packages/cli/src/narratives-cmd.js +147 -0
- package/dist/packages/cli/src/narratives.js +114 -0
- package/dist/packages/cli/src/overlay/model.js +147 -0
- package/dist/packages/cli/src/overlay/page.js +146 -0
- package/dist/packages/cli/src/overlay/pnl.js +75 -0
- package/dist/packages/cli/src/overlay/server.js +170 -0
- package/dist/packages/cli/src/overlay-cmd.js +367 -0
- package/dist/packages/cli/src/pnl-card.js +4 -0
- package/dist/packages/cli/src/record-cmd.js +82 -11
- package/dist/packages/cli/src/rules-cmd.js +2 -1
- package/dist/packages/cli/src/rules.js +24 -4
- package/dist/packages/cli/src/screens/autotrade-journey.js +134 -0
- package/dist/packages/cli/src/screens/autotrade-keys.js +13 -0
- package/dist/packages/cli/src/screens/autotrade-screen.js +57 -6
- package/dist/packages/cli/src/screens/autotrade-ui.js +17 -7
- package/dist/packages/cli/src/screens/autotrade-worker.js +4 -2
- package/dist/packages/cli/src/screens/narrative.js +154 -2
- package/dist/packages/cli/src/state.js +1 -0
- package/dist/packages/cli/src/telegram-cmd.js +4 -1
- package/dist/packages/cli/src/version.js +1 -1
- package/dist/packages/custom/src/rules.js +5 -1
- package/dist/packages/data/src/trade/ledger/schema.js +1 -1
- package/dist/packages/mcp/assets/kb/app-help/autotrade-executor-kit.md +44 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-journey.md +46 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-limits.md +48 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-real-signal.md +45 -0
- package/dist/packages/mcp/assets/kb/app-help/classification-models.md +41 -0
- package/dist/packages/mcp/assets/kb/app-help/live-trading.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/narratives-tracker.md +45 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-autotrade.md +12 -0
- package/dist/packages/mcp/assets/kb/app-help/strategy-dashboard.md +38 -0
- package/dist/packages/mcp/assets/kb/app-help/streamer-overlay.md +36 -0
- package/dist/packages/mcp/assets/kb/app-help/trade-ledger.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-change-a-strategy-by-chat.md +3 -1
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-on-the-q-screen.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-rug-proof-entries-experimental.md +52 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-running-it-all-day.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-stopping-it.md +2 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-always-on-service.md +59 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-strategy-dashboard-dexterm-dash.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-is-paper-self-directed.md +9 -2
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-will-not-do.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade.md +3 -1
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-before-any-experimental-trading.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-copy-and-paste-without-surprises.md +0 -1
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-if-dexterm-says-command-not-found.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-reopen-dexterm-later.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-terminal-shell-prompt-command-output-and-path.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-windows-expectations.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-windows.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-1-ask-for-a-strategy.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-2-backtest-it-held-out-split.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-3-forward-test-it-on-live-data.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-4-promote-it-to-always-on-paper.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-5-real-only-if-you-choose.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-the-ladder.md +41 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-the-report.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-what-the-analyst-knows.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat.md +26 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-hosted-jev-with-your-own-key.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-how-they-measured-on-dexterm-s-own-history.md +52 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-set-up-kev-on-your-own-machine.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-settings.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-the-choices.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-where-it-plugs-in.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier-which-model-for-which-machine.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-classifier.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-cli-invocations.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-headless-recorder-dexterm-record.md +3 -0
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-data-sources-recorded-history-and-retention.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-install.md +3 -3
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-requirements.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-supported-platforms.md +2 -11
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-executor-health.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-paper-vs-real.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-the-digest.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-the-executor-kit.md +48 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-the-whole-path.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-what-dexterm-does-and-never-does.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-your-limits.md +77 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real.md +24 -0
- package/dist/packages/mcp/assets/kb/docs/docs-larp-measured-accuracy.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-larp-paste-a-coin-on-the-web.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-larp-the-larp-score.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-changed-in-0-1-7.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-real-mode-your-strategy-s-trades-to-your.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-the-short-version.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-using-a-trading-bot-with-dexterm.md +0 -2
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-what-dexterm-does-not-do.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-narratives-how-coins-are-grouped.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-narratives-limits.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-narratives-what-is-measured.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-narratives-what-testing-showed.md +43 -0
- package/dist/packages/mcp/assets/kb/docs/docs-narratives-where-to-find-it.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-narratives.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-before-you-start.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-limits.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-options.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-security-model.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-set-it-up-in-obs-step-by-step.md +49 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-the-pnl-scene-paper-and-live.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-the-three-scenes.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay-what-is-redacted.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-overlay.md +25 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-receipts-what-your-executor-did.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-safety.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-set-it-up.md +47 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-the-channels.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-the-signal.md +48 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-what-it-is.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-what-it-will-not-do.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-where-you-see-it.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-screens-bubble-map.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-spectator-streaming-it.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-is.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-voice-linux-and-windows.md +2 -2
- package/dist/packages/mcp/assets/kb/entries/autotrade.md +4 -2
- package/dist/packages/mcp/assets/kb/entries/narratives-tracker.md +45 -0
- package/dist/packages/mcp/src/autotrade-tools.js +168 -5
- package/dist/packages/mcp/src/engine/restrictions.js +3 -3
- package/dist/packages/mcp/src/index.js +1 -1
- package/dist/packages/mcp/src/ledger-tools.js +155 -7
- package/dist/packages/mcp/src/server.js +125 -10
- package/dist/packages/mcp/src/spectator-sink.js +27 -0
- package/dist/packages/narratives/src/cluster.js +193 -0
- package/dist/packages/narratives/src/embed.js +184 -0
- package/dist/packages/narratives/src/export.js +60 -0
- package/dist/packages/narratives/src/index.js +10 -0
- package/dist/packages/narratives/src/label.js +48 -0
- package/dist/packages/narratives/src/normalize.js +179 -0
- package/dist/packages/narratives/src/recorder.js +93 -0
- package/dist/packages/narratives/src/tracker.js +328 -0
- package/dist/packages/recorder/src/exit-probes.js +215 -0
- package/dist/packages/recorder/src/index.js +1 -0
- package/dist/packages/recorder/src/recorder.js +11 -1
- package/dist/packages/recorder/src/retention.js +4 -0
- package/dist/packages/recorder/src/schema.js +20 -1
- package/dist/packages/tui/src/keymap.js +12 -0
- package/package.json +3 -1
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-windows-powershell-experimental.md +0 -39
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://dexterm.xyz/schemas/limits.schema.json",
|
|
4
|
+
"title": "dexterm-limits/1",
|
|
5
|
+
"description": "dexterm real-mode limits: $DEXTERM_HOME/autotrade/real/limits.json. A number in global replaces the placeholder default (null turns it off); every other scope can only tighten (the stricter number wins). Only `dexterm autotrade limits` writes it; raising needs a typed confirmation on a real terminal.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"schema": {
|
|
13
|
+
"const": "dexterm-limits/1"
|
|
14
|
+
},
|
|
15
|
+
"global": {
|
|
16
|
+
"$ref": "#/$defs/globalSet"
|
|
17
|
+
},
|
|
18
|
+
"modes": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"real": {
|
|
23
|
+
"$ref": "#/$defs/set"
|
|
24
|
+
},
|
|
25
|
+
"paper": {
|
|
26
|
+
"$ref": "#/$defs/set"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"strategies": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"propertyNames": {
|
|
33
|
+
"pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": {
|
|
36
|
+
"$ref": "#/$defs/set"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"accounts": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"propertyNames": {
|
|
42
|
+
"pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": {
|
|
45
|
+
"$ref": "#/$defs/set"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"updatedAt": {
|
|
49
|
+
"type": "number"
|
|
50
|
+
},
|
|
51
|
+
"migratedFrom": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"$defs": {
|
|
56
|
+
"set": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"perTradeSol": {
|
|
61
|
+
"type": "number",
|
|
62
|
+
"minimum": 1e-06,
|
|
63
|
+
"maximum": 1000000000000,
|
|
64
|
+
"description": "the most SOL one buy signal may spend (a bigger buy is clamped down to it) (SOL; a cap: smaller is stricter)"
|
|
65
|
+
},
|
|
66
|
+
"perTradePct": {
|
|
67
|
+
"type": "number",
|
|
68
|
+
"minimum": 0.01,
|
|
69
|
+
"maximum": 100,
|
|
70
|
+
"description": "the most one buy may spend as a percent of the book (bookSol, else the strategy book); with perTradeSol set too, the smaller wins (% of book; a cap: smaller is stricter)"
|
|
71
|
+
},
|
|
72
|
+
"dailySol": {
|
|
73
|
+
"type": "number",
|
|
74
|
+
"minimum": 1e-06,
|
|
75
|
+
"maximum": 1000000000000,
|
|
76
|
+
"description": "SOL all buy signals may spend per local day (a buy over it is refused) (SOL/day; a cap: smaller is stricter)"
|
|
77
|
+
},
|
|
78
|
+
"buysPerDay": {
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"minimum": 0,
|
|
81
|
+
"maximum": 1000000,
|
|
82
|
+
"description": "buy signals per local day (0 = no buys) (buys/day; a cap: smaller is stricter)"
|
|
83
|
+
},
|
|
84
|
+
"maxOpenPositions": {
|
|
85
|
+
"type": "integer",
|
|
86
|
+
"minimum": 0,
|
|
87
|
+
"maximum": 100000,
|
|
88
|
+
"description": "real positions open at once, across every strategy and account on this home (open; a cap: smaller is stricter)"
|
|
89
|
+
},
|
|
90
|
+
"maxExposurePct": {
|
|
91
|
+
"type": "number",
|
|
92
|
+
"minimum": 0.01,
|
|
93
|
+
"maximum": 100,
|
|
94
|
+
"description": "the cost of every open real position together, as a percent of the book (a buy is clamped to what is left) (% of book; a cap: smaller is stricter)"
|
|
95
|
+
},
|
|
96
|
+
"minPositionSol": {
|
|
97
|
+
"type": "number",
|
|
98
|
+
"minimum": 0,
|
|
99
|
+
"maximum": 1000000000000,
|
|
100
|
+
"description": "a buy smaller than this after every clamp is refused (no dust orders) (SOL; a floor: larger is stricter)"
|
|
101
|
+
},
|
|
102
|
+
"maxPositionSol": {
|
|
103
|
+
"type": "number",
|
|
104
|
+
"minimum": 1e-06,
|
|
105
|
+
"maximum": 1000000000000,
|
|
106
|
+
"description": "the most SOL one position may cost, adds included (a buy is clamped to what is left) (SOL; a cap: smaller is stricter)"
|
|
107
|
+
},
|
|
108
|
+
"perCoinSolPerDay": {
|
|
109
|
+
"type": "number",
|
|
110
|
+
"minimum": 1e-06,
|
|
111
|
+
"maximum": 1000000000000,
|
|
112
|
+
"description": "SOL spent on one coin per local day, re-entries included (a buy over it is refused) (SOL/day; a cap: smaller is stricter)"
|
|
113
|
+
},
|
|
114
|
+
"perCoinBuysPerDay": {
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"minimum": 0,
|
|
117
|
+
"maximum": 100000,
|
|
118
|
+
"description": "buy signals on one coin per local day (buys/day; a cap: smaller is stricter)"
|
|
119
|
+
},
|
|
120
|
+
"bookSol": {
|
|
121
|
+
"type": "number",
|
|
122
|
+
"minimum": 1e-06,
|
|
123
|
+
"maximum": 1000000000000,
|
|
124
|
+
"description": "what the percent limits are a percent of: the size of YOUR account (unset = the strategy's own book) (SOL; a cap: smaller is stricter)"
|
|
125
|
+
},
|
|
126
|
+
"dailyLossSol": {
|
|
127
|
+
"type": "number",
|
|
128
|
+
"minimum": 1e-06,
|
|
129
|
+
"maximum": 1000000000000,
|
|
130
|
+
"description": "when the day's realized loss reaches this, no new buy goes out until the next local day (exits still do) (SOL/day; a cap: smaller is stricter)"
|
|
131
|
+
},
|
|
132
|
+
"maxDrawdownSol": {
|
|
133
|
+
"type": "number",
|
|
134
|
+
"minimum": 1e-06,
|
|
135
|
+
"maximum": 1000000000000,
|
|
136
|
+
"description": "the drawdown breaker: realized PnL this far below its peak trips it; no new buy until you reset it (typed) (SOL; a cap: smaller is stricter)"
|
|
137
|
+
},
|
|
138
|
+
"lossStreak": {
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 1,
|
|
141
|
+
"maximum": 10000,
|
|
142
|
+
"description": "this many losing closes in a row pause new buys for lossStreakPauseMin (losses; a cap: smaller is stricter)"
|
|
143
|
+
},
|
|
144
|
+
"lossStreakPauseMin": {
|
|
145
|
+
"type": "number",
|
|
146
|
+
"minimum": 1,
|
|
147
|
+
"maximum": 525600,
|
|
148
|
+
"description": "how long the loss-streak pause lasts (min; a floor: larger is stricter)"
|
|
149
|
+
},
|
|
150
|
+
"maxHoldMinutes": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"minimum": 1,
|
|
153
|
+
"maximum": 525600,
|
|
154
|
+
"description": "a real position held this long gets its exit signal (the stricter of this and the exit profile's own cap) (min; a cap: smaller is stricter)"
|
|
155
|
+
},
|
|
156
|
+
"minLiquidityUsd": {
|
|
157
|
+
"type": "number",
|
|
158
|
+
"minimum": 0,
|
|
159
|
+
"maximum": 1000000000000,
|
|
160
|
+
"description": "no buy on a coin with less pool liquidity (unknown liquidity is refused while this is set) (USD; a floor: larger is stricter)"
|
|
161
|
+
},
|
|
162
|
+
"minMcapUsd": {
|
|
163
|
+
"type": "number",
|
|
164
|
+
"minimum": 0,
|
|
165
|
+
"maximum": 1000000000000,
|
|
166
|
+
"description": "no buy on a coin below this market cap (unknown is refused while this is set) (USD; a floor: larger is stricter)"
|
|
167
|
+
},
|
|
168
|
+
"maxSlippageBps": {
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"minimum": 1,
|
|
171
|
+
"maximum": 10000,
|
|
172
|
+
"description": "the slippage tolerance a signal states (the stricter of this and the strategy's) (bps; a cap: smaller is stricter)"
|
|
173
|
+
},
|
|
174
|
+
"maxPriceImpactPct": {
|
|
175
|
+
"type": "number",
|
|
176
|
+
"minimum": 0.01,
|
|
177
|
+
"maximum": 100,
|
|
178
|
+
"description": "the price impact a buy may have on the pool (constant-product estimate): a buy is clamped to it; the signal states it (%; a cap: smaller is stricter)"
|
|
179
|
+
},
|
|
180
|
+
"signalTtlSec": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 10,
|
|
183
|
+
"maximum": 600,
|
|
184
|
+
"description": "how long an executor may act on a signal (the stricter of this and the channel setting) (s; a cap: smaller is stricter)"
|
|
185
|
+
},
|
|
186
|
+
"maxBuysPerMinute": {
|
|
187
|
+
"type": "integer",
|
|
188
|
+
"minimum": 0,
|
|
189
|
+
"maximum": 10000,
|
|
190
|
+
"description": "the signal rate limit: buy signals in any 60 s (buys/min; a cap: smaller is stricter)"
|
|
191
|
+
},
|
|
192
|
+
"maxSellsPerMinute": {
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"minimum": 1,
|
|
195
|
+
"maximum": 10000,
|
|
196
|
+
"description": "OPTIONAL: sells are never capped unless you set this; a sell over it waits for the next tick (sells/min; a cap: smaller is stricter)"
|
|
197
|
+
},
|
|
198
|
+
"minForwardTrades": {
|
|
199
|
+
"type": "integer",
|
|
200
|
+
"minimum": 0,
|
|
201
|
+
"maximum": 100000,
|
|
202
|
+
"description": "the evidence floor for real: arming needs a COMPLETED forward test of these exact rules with at least this many closed paper trades, and a backtest on record (below it only a typed override on your own terminal arms, journaled) (trades; a floor: larger is stricter)"
|
|
203
|
+
},
|
|
204
|
+
"executorSilenceMin": {
|
|
205
|
+
"type": "number",
|
|
206
|
+
"minimum": 1,
|
|
207
|
+
"maximum": 525600,
|
|
208
|
+
"description": "no heartbeat, receipt or ack from your executor for this long pauses new buy signals (exits still go out) (min; a cap: smaller is stricter)"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"globalSet": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"properties": {
|
|
216
|
+
"perTradeSol": {
|
|
217
|
+
"oneOf": [
|
|
218
|
+
{
|
|
219
|
+
"type": "null",
|
|
220
|
+
"description": "off: this limit does not apply"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "number",
|
|
224
|
+
"minimum": 1e-06,
|
|
225
|
+
"maximum": 1000000000000,
|
|
226
|
+
"description": "the most SOL one buy signal may spend (a bigger buy is clamped down to it) (SOL; a cap: smaller is stricter)"
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"perTradePct": {
|
|
231
|
+
"oneOf": [
|
|
232
|
+
{
|
|
233
|
+
"type": "null",
|
|
234
|
+
"description": "off: this limit does not apply"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "number",
|
|
238
|
+
"minimum": 0.01,
|
|
239
|
+
"maximum": 100,
|
|
240
|
+
"description": "the most one buy may spend as a percent of the book (bookSol, else the strategy book); with perTradeSol set too, the smaller wins (% of book; a cap: smaller is stricter)"
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"dailySol": {
|
|
245
|
+
"oneOf": [
|
|
246
|
+
{
|
|
247
|
+
"type": "null",
|
|
248
|
+
"description": "off: this limit does not apply"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"type": "number",
|
|
252
|
+
"minimum": 1e-06,
|
|
253
|
+
"maximum": 1000000000000,
|
|
254
|
+
"description": "SOL all buy signals may spend per local day (a buy over it is refused) (SOL/day; a cap: smaller is stricter)"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"buysPerDay": {
|
|
259
|
+
"oneOf": [
|
|
260
|
+
{
|
|
261
|
+
"type": "null",
|
|
262
|
+
"description": "off: this limit does not apply"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"type": "integer",
|
|
266
|
+
"minimum": 0,
|
|
267
|
+
"maximum": 1000000,
|
|
268
|
+
"description": "buy signals per local day (0 = no buys) (buys/day; a cap: smaller is stricter)"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"maxOpenPositions": {
|
|
273
|
+
"oneOf": [
|
|
274
|
+
{
|
|
275
|
+
"type": "null",
|
|
276
|
+
"description": "off: this limit does not apply"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"type": "integer",
|
|
280
|
+
"minimum": 0,
|
|
281
|
+
"maximum": 100000,
|
|
282
|
+
"description": "real positions open at once, across every strategy and account on this home (open; a cap: smaller is stricter)"
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"maxExposurePct": {
|
|
287
|
+
"oneOf": [
|
|
288
|
+
{
|
|
289
|
+
"type": "null",
|
|
290
|
+
"description": "off: this limit does not apply"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "number",
|
|
294
|
+
"minimum": 0.01,
|
|
295
|
+
"maximum": 100,
|
|
296
|
+
"description": "the cost of every open real position together, as a percent of the book (a buy is clamped to what is left) (% of book; a cap: smaller is stricter)"
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
"minPositionSol": {
|
|
301
|
+
"oneOf": [
|
|
302
|
+
{
|
|
303
|
+
"type": "null",
|
|
304
|
+
"description": "off: this limit does not apply"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"type": "number",
|
|
308
|
+
"minimum": 0,
|
|
309
|
+
"maximum": 1000000000000,
|
|
310
|
+
"description": "a buy smaller than this after every clamp is refused (no dust orders) (SOL; a floor: larger is stricter)"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
"maxPositionSol": {
|
|
315
|
+
"oneOf": [
|
|
316
|
+
{
|
|
317
|
+
"type": "null",
|
|
318
|
+
"description": "off: this limit does not apply"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"type": "number",
|
|
322
|
+
"minimum": 1e-06,
|
|
323
|
+
"maximum": 1000000000000,
|
|
324
|
+
"description": "the most SOL one position may cost, adds included (a buy is clamped to what is left) (SOL; a cap: smaller is stricter)"
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"perCoinSolPerDay": {
|
|
329
|
+
"oneOf": [
|
|
330
|
+
{
|
|
331
|
+
"type": "null",
|
|
332
|
+
"description": "off: this limit does not apply"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"type": "number",
|
|
336
|
+
"minimum": 1e-06,
|
|
337
|
+
"maximum": 1000000000000,
|
|
338
|
+
"description": "SOL spent on one coin per local day, re-entries included (a buy over it is refused) (SOL/day; a cap: smaller is stricter)"
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
"perCoinBuysPerDay": {
|
|
343
|
+
"oneOf": [
|
|
344
|
+
{
|
|
345
|
+
"type": "null",
|
|
346
|
+
"description": "off: this limit does not apply"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"type": "integer",
|
|
350
|
+
"minimum": 0,
|
|
351
|
+
"maximum": 100000,
|
|
352
|
+
"description": "buy signals on one coin per local day (buys/day; a cap: smaller is stricter)"
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
"bookSol": {
|
|
357
|
+
"oneOf": [
|
|
358
|
+
{
|
|
359
|
+
"type": "null",
|
|
360
|
+
"description": "off: this limit does not apply"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"type": "number",
|
|
364
|
+
"minimum": 1e-06,
|
|
365
|
+
"maximum": 1000000000000,
|
|
366
|
+
"description": "what the percent limits are a percent of: the size of YOUR account (unset = the strategy's own book) (SOL; a cap: smaller is stricter)"
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
"dailyLossSol": {
|
|
371
|
+
"oneOf": [
|
|
372
|
+
{
|
|
373
|
+
"type": "null",
|
|
374
|
+
"description": "off: this limit does not apply"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"type": "number",
|
|
378
|
+
"minimum": 1e-06,
|
|
379
|
+
"maximum": 1000000000000,
|
|
380
|
+
"description": "when the day's realized loss reaches this, no new buy goes out until the next local day (exits still do) (SOL/day; a cap: smaller is stricter)"
|
|
381
|
+
}
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
"maxDrawdownSol": {
|
|
385
|
+
"oneOf": [
|
|
386
|
+
{
|
|
387
|
+
"type": "null",
|
|
388
|
+
"description": "off: this limit does not apply"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"type": "number",
|
|
392
|
+
"minimum": 1e-06,
|
|
393
|
+
"maximum": 1000000000000,
|
|
394
|
+
"description": "the drawdown breaker: realized PnL this far below its peak trips it; no new buy until you reset it (typed) (SOL; a cap: smaller is stricter)"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
"lossStreak": {
|
|
399
|
+
"oneOf": [
|
|
400
|
+
{
|
|
401
|
+
"type": "null",
|
|
402
|
+
"description": "off: this limit does not apply"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"type": "integer",
|
|
406
|
+
"minimum": 1,
|
|
407
|
+
"maximum": 10000,
|
|
408
|
+
"description": "this many losing closes in a row pause new buys for lossStreakPauseMin (losses; a cap: smaller is stricter)"
|
|
409
|
+
}
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
"lossStreakPauseMin": {
|
|
413
|
+
"oneOf": [
|
|
414
|
+
{
|
|
415
|
+
"type": "null",
|
|
416
|
+
"description": "off: this limit does not apply"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"type": "number",
|
|
420
|
+
"minimum": 1,
|
|
421
|
+
"maximum": 525600,
|
|
422
|
+
"description": "how long the loss-streak pause lasts (min; a floor: larger is stricter)"
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"maxHoldMinutes": {
|
|
427
|
+
"oneOf": [
|
|
428
|
+
{
|
|
429
|
+
"type": "null",
|
|
430
|
+
"description": "off: this limit does not apply"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"type": "number",
|
|
434
|
+
"minimum": 1,
|
|
435
|
+
"maximum": 525600,
|
|
436
|
+
"description": "a real position held this long gets its exit signal (the stricter of this and the exit profile's own cap) (min; a cap: smaller is stricter)"
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
"minLiquidityUsd": {
|
|
441
|
+
"oneOf": [
|
|
442
|
+
{
|
|
443
|
+
"type": "null",
|
|
444
|
+
"description": "off: this limit does not apply"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"type": "number",
|
|
448
|
+
"minimum": 0,
|
|
449
|
+
"maximum": 1000000000000,
|
|
450
|
+
"description": "no buy on a coin with less pool liquidity (unknown liquidity is refused while this is set) (USD; a floor: larger is stricter)"
|
|
451
|
+
}
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"minMcapUsd": {
|
|
455
|
+
"oneOf": [
|
|
456
|
+
{
|
|
457
|
+
"type": "null",
|
|
458
|
+
"description": "off: this limit does not apply"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"type": "number",
|
|
462
|
+
"minimum": 0,
|
|
463
|
+
"maximum": 1000000000000,
|
|
464
|
+
"description": "no buy on a coin below this market cap (unknown is refused while this is set) (USD; a floor: larger is stricter)"
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"maxSlippageBps": {
|
|
469
|
+
"oneOf": [
|
|
470
|
+
{
|
|
471
|
+
"type": "null",
|
|
472
|
+
"description": "off: this limit does not apply"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"type": "integer",
|
|
476
|
+
"minimum": 1,
|
|
477
|
+
"maximum": 10000,
|
|
478
|
+
"description": "the slippage tolerance a signal states (the stricter of this and the strategy's) (bps; a cap: smaller is stricter)"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
"maxPriceImpactPct": {
|
|
483
|
+
"oneOf": [
|
|
484
|
+
{
|
|
485
|
+
"type": "null",
|
|
486
|
+
"description": "off: this limit does not apply"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"type": "number",
|
|
490
|
+
"minimum": 0.01,
|
|
491
|
+
"maximum": 100,
|
|
492
|
+
"description": "the price impact a buy may have on the pool (constant-product estimate): a buy is clamped to it; the signal states it (%; a cap: smaller is stricter)"
|
|
493
|
+
}
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
"signalTtlSec": {
|
|
497
|
+
"oneOf": [
|
|
498
|
+
{
|
|
499
|
+
"type": "null",
|
|
500
|
+
"description": "off: this limit does not apply"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"type": "integer",
|
|
504
|
+
"minimum": 10,
|
|
505
|
+
"maximum": 600,
|
|
506
|
+
"description": "how long an executor may act on a signal (the stricter of this and the channel setting) (s; a cap: smaller is stricter)"
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
},
|
|
510
|
+
"maxBuysPerMinute": {
|
|
511
|
+
"oneOf": [
|
|
512
|
+
{
|
|
513
|
+
"type": "null",
|
|
514
|
+
"description": "off: this limit does not apply"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"type": "integer",
|
|
518
|
+
"minimum": 0,
|
|
519
|
+
"maximum": 10000,
|
|
520
|
+
"description": "the signal rate limit: buy signals in any 60 s (buys/min; a cap: smaller is stricter)"
|
|
521
|
+
}
|
|
522
|
+
]
|
|
523
|
+
},
|
|
524
|
+
"maxSellsPerMinute": {
|
|
525
|
+
"oneOf": [
|
|
526
|
+
{
|
|
527
|
+
"type": "null",
|
|
528
|
+
"description": "off: this limit does not apply"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"type": "integer",
|
|
532
|
+
"minimum": 1,
|
|
533
|
+
"maximum": 10000,
|
|
534
|
+
"description": "OPTIONAL: sells are never capped unless you set this; a sell over it waits for the next tick (sells/min; a cap: smaller is stricter)"
|
|
535
|
+
}
|
|
536
|
+
]
|
|
537
|
+
},
|
|
538
|
+
"minForwardTrades": {
|
|
539
|
+
"oneOf": [
|
|
540
|
+
{
|
|
541
|
+
"type": "null",
|
|
542
|
+
"description": "off: this limit does not apply"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"type": "integer",
|
|
546
|
+
"minimum": 0,
|
|
547
|
+
"maximum": 100000,
|
|
548
|
+
"description": "the evidence floor for real: arming needs a COMPLETED forward test of these exact rules with at least this many closed paper trades, and a backtest on record (below it only a typed override on your own terminal arms, journaled) (trades; a floor: larger is stricter)"
|
|
549
|
+
}
|
|
550
|
+
]
|
|
551
|
+
},
|
|
552
|
+
"executorSilenceMin": {
|
|
553
|
+
"oneOf": [
|
|
554
|
+
{
|
|
555
|
+
"type": "null",
|
|
556
|
+
"description": "off: this limit does not apply"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"type": "number",
|
|
560
|
+
"minimum": 1,
|
|
561
|
+
"maximum": 525600,
|
|
562
|
+
"description": "no heartbeat, receipt or ack from your executor for this long pauses new buy signals (exits still go out) (min; a cap: smaller is stricter)"
|
|
563
|
+
}
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# dexterm executor reference kit
|
|
2
|
+
|
|
3
|
+
dexterm holds no key and signs nothing. In real mode a strategy sends a **LIVE TRADE FIRE** signal
|
|
4
|
+
(`dexterm-trade-fire/1`) for every buy and sell. **Your own executor** acts on it: a Telegram trading bot you chose,
|
|
5
|
+
or any script.
|
|
6
|
+
|
|
7
|
+
This folder holds three small executors you can wire up in minutes, so you can see the whole path work before
|
|
8
|
+
anything can spend money:
|
|
9
|
+
|
|
10
|
+
| file | channel | how dexterm reaches it |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `webhook-executor.mjs` | webhook | `dexterm autotrade signal channels --webhook http://127.0.0.1:8787/signal` |
|
|
13
|
+
| `signal-cmd-executor.mjs` | command hook | `dexterm autotrade signal channels --signal-cmd '["/abs/node","/abs/signal-cmd-executor.mjs","--account","main"]'` |
|
|
14
|
+
| `jsonl-tail-executor.mjs` | JSONL stream | `dexterm autotrade signal channels --jsonl on` (add `--jsonl-signed on` for HMAC lines) |
|
|
15
|
+
|
|
16
|
+
Each one handles every signal the same way:
|
|
17
|
+
|
|
18
|
+
1. It verifies the HMAC, when you give it the secret file. Without `--secret-file` it acts on unsigned bodies (it says `HMAC NOT checked` when it starts); before you put a real trade into `act()`, run it with `--secret-file` and `--require-hmac`.
|
|
19
|
+
2. It checks the account id.
|
|
20
|
+
3. It dedupes by nonce. Delivery is at-least-once, so a repeat is normal, and the seen set survives a restart.
|
|
21
|
+
4. It ignores anything past `expiresAt` (the TTL).
|
|
22
|
+
5. It writes a receipt to dexterm's `autotrade/real/receipts.jsonl` and a heartbeat to `autotrade/real/executor.jsonl`.
|
|
23
|
+
|
|
24
|
+
**All of them are DRY RUN.** `act()` in `kit.mjs` only logs what it WOULD do, and the receipt says so:
|
|
25
|
+
status `rejected`, reason `dry-run: would BUY …`. There is no wallet code, no key and no chain call anywhere in this
|
|
26
|
+
kit. Trading for real means replacing `act()` with your own code, or handing the order to your own bot. That is your
|
|
27
|
+
code and your wallet, never dexterm's.
|
|
28
|
+
|
|
29
|
+
## Five minutes, end to end (paper money only)
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
# 1. a secret for the HMAC (written to a 0600 file, stored in your keychain, never printed)
|
|
33
|
+
dexterm autotrade signal secret generate --out ~/.dexterm-exec.secret
|
|
34
|
+
|
|
35
|
+
# 2. start the kit's webhook executor (dry run) in another terminal
|
|
36
|
+
node webhook-executor.mjs --account main --secret-file ~/.dexterm-exec.secret
|
|
37
|
+
|
|
38
|
+
# 3. point dexterm at it, then prove the round trip
|
|
39
|
+
dexterm autotrade signal channels --webhook http://127.0.0.1:8787/signal
|
|
40
|
+
dexterm autotrade signal test # per channel: delivered, latency, the kit's receipt
|
|
41
|
+
dexterm autotrade executor status # alive · last heartbeat · last receipt · lag
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`signal test` sends a signal marked `test: true` that names no mint, so there is nothing in it to trade. The kit
|
|
45
|
+
receipts it as `rejected` (`test signal: received, never traded`).
|
|
46
|
+
|
|
47
|
+
## Heartbeats and the silence pause
|
|
48
|
+
|
|
49
|
+
dexterm counts a heartbeat, a receipt, or an ack on the webhook or command hook as a sign of life. When it hears
|
|
50
|
+
nothing for longer than your `executorSilenceMin` limit (placeholder: 15 min), a real run **pauses new buy
|
|
51
|
+
signals** and tells you in the run log and on Telegram. Exits keep going out. The kit sends a heartbeat every 60 s
|
|
52
|
+
(`--heartbeat-sec`). Your own executor can append the same line, POST it to the run's loopback listener
|
|
53
|
+
(`--executor-port`), or run `dexterm autotrade executor heartbeat`:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{"schema":"dexterm-executor-heartbeat/1","at":1761300000000,"executor":"my-bot","accountId":"main","dryRun":false,"lastNonce":42}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Receipts
|
|
60
|
+
|
|
61
|
+
A receipt is data only. It moves a real position from `unconfirmed` to executed / rejected / failed. With a fill
|
|
62
|
+
(`priceUsd`, `sizeSol`, `tokens`, `txSig`), dexterm also measures how far the real fill was from its own paper fill:
|
|
63
|
+
slippage, latency, partial fills and rejections. That shows in `dexterm autotrade audit`, `signal status` and
|
|
64
|
+
`dexterm autotrade report`.
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{"schema":"dexterm-trade-receipt/1","signalId":"<the signal's id>","nonce":42,"accountId":"main","status":"executed","at":1761300001200,"fill":{"priceUsd":0.00123,"sizeSol":0.25,"tokens":40650,"txSig":null},"reason":null,"executor":"my-bot"}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
See `telegram-bot-recipe.md` for the Telegram trading-bot setup. The bot executes, and dexterm never signs.
|