dexterm-cli 0.1.7 → 0.2.0
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 +3 -1
- package/dist/packages/agents/src/tiers.js +9 -0
- package/dist/packages/agents/src/tools.js +10 -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 +2 -1
- 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 +3 -0
- package/dist/packages/autotrade/src/forward.js +355 -0
- package/dist/packages/autotrade/src/index.js +19 -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/runner.js +62 -11
- package/dist/packages/autotrade/src/service-guard.js +125 -0
- package/dist/packages/autotrade/src/service-install.js +213 -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/signal-channels.js +312 -0
- package/dist/packages/autotrade/src/signal.js +196 -0
- package/dist/packages/autotrade/src/strategy.js +3 -1
- package/dist/packages/autotrade/src/trade-ledger.js +2 -2
- 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 +14 -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 +8 -4
- 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 +257 -13
- 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/ledger-cmd.js +4 -2
- package/dist/packages/cli/src/pnl-card.js +4 -0
- 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/telegram-cmd.js +4 -1
- package/dist/packages/cli/src/version.js +1 -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/live-trading.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/screen-autotrade.md +12 -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-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 +57 -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-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 +39 -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 +24 -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 +1 -1
- 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-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-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 +35 -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-telegram-what-it-is.md +1 -1
- package/dist/packages/mcp/assets/kb/entries/autotrade.md +4 -2
- 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 +21 -10
- package/dist/packages/tui/src/keymap.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat
|
|
3
|
+
title: Build a strategy by chat
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat
|
|
8
|
+
tags:
|
|
9
|
+
- docs
|
|
10
|
+
- build-a-strategy-by-chat
|
|
11
|
+
- build
|
|
12
|
+
- strategy
|
|
13
|
+
- chat
|
|
14
|
+
confidence: high
|
|
15
|
+
owner: maintainers
|
|
16
|
+
origin: docs-generated
|
|
17
|
+
reviewed_by: generated@2026-10-16
|
|
18
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
19
|
+
sources:
|
|
20
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
21
|
+
date: 2026-10-16
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
Ask the analyst for a strategy, then back-test it on your recorded history, forward-test it on live data on paper, and promote it one step at a time to the always-on service and, only if you choose, to real mode. Every step needs evidence; nothing is promoted by the model. Paper by default, not financial advice.
|
|
@@ -41,10 +41,10 @@ $ dexterm doctor
|
|
|
41
41
|
The package is named `dexterm-cli` because npm refuses the name `dexterm` as too similar to `xterm`. The command it installs is `dexterm`. The package ships compiled JavaScript, so it needs no build step. Every GitHub release carries a build-provenance attestation and `SHA256SUMS` you can verify (see the trust page (https://dexterm.xyz/trust/)).
|
|
42
42
|
|
|
43
43
|
```sh install from the release
|
|
44
|
-
$ # download dexterm-0.
|
|
44
|
+
$ # download dexterm-0.2.0-src.tar.gz and SHA256SUMS from the releases page, then:
|
|
45
45
|
$ shasum -a 256 -c SHA256SUMS --ignore-missing
|
|
46
|
-
$ gh attestation verify dexterm-0.
|
|
47
|
-
$ tar -xzf dexterm-0.
|
|
46
|
+
$ gh attestation verify dexterm-0.2.0-src.tar.gz --repo dexterm-xyz/dexterm
|
|
47
|
+
$ tar -xzf dexterm-0.2.0-src.tar.gz && cd dexterm-0.2.0
|
|
48
48
|
$ ./install.sh
|
|
49
49
|
$ dexterm doctor
|
|
50
50
|
```
|
|
@@ -32,4 +32,4 @@ date: 2026-10-16
|
|
|
32
32
|
| optional: a free RPC key | the ranked top-20 holder list and faster chain reads | Helius, Alchemy, QuickNode or Ankr free tier; see configuration (https://dexterm.xyz/docs/configuration). |
|
|
33
33
|
| optional: Rust (`cargo`) | the native docked chart window | without it the chart popup opens in your browser; see popup chart (https://dexterm.xyz/docs/popup-chart). |
|
|
34
34
|
|
|
35
|
-
> note: dexterm 0.
|
|
35
|
+
> note: dexterm 0.2.0 is out (2026-10-25), open source under AGPL-3.0-only at github.com/dexterm-xyz/dexterm (https://github.com/dexterm-xyz/dexterm). It is early: trading is experimental and has known bugs. The release ships checksums, a build-provenance attestation and an SBOM, and its VirusTotal result (including flags we explain) is on the trust page (https://dexterm.xyz/trust/). It is also on npm as `dexterm-cli` (https://www.npmjs.com/package/dexterm-cli); the command it installs is still `dexterm`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-executor-health
|
|
3
|
+
title: Going real, safely › Executor health
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: Executor health
|
|
8
|
+
anchor: executor-health
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#executor-health
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- executor
|
|
14
|
+
- health
|
|
15
|
+
- going
|
|
16
|
+
- real
|
|
17
|
+
- safely
|
|
18
|
+
confidence: high
|
|
19
|
+
owner: maintainers
|
|
20
|
+
origin: docs-generated
|
|
21
|
+
reviewed_by: generated@2026-10-16
|
|
22
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
23
|
+
sources:
|
|
24
|
+
- site/content/docs/going-real.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
dexterm counts three signs of life from your executor:
|
|
29
|
+
- a heartbeat: a `dexterm-executor-heartbeat/1` line in `~/.dexterm/autotrade/real/executor.jsonl`, `dexterm autotrade executor heartbeat`, or a POST to the listener a real run opens with `--executor-port N` (127.0.0.1 only, HMAC required when a secret is set);
|
|
30
|
+
- a receipt;
|
|
31
|
+
- an ack on the webhook or the command hook.
|
|
32
|
+
|
|
33
|
+
`dexterm autotrade executor status`, `signal status`, the `Q` screen and Telegram's `/status` show:
|
|
34
|
+
- whether your executor is alive, and when it was last heard;
|
|
35
|
+
- its last receipt;
|
|
36
|
+
- the median lag from a signal to its receipt.
|
|
37
|
+
|
|
38
|
+
**When it goes quiet** for longer than `executorSilenceMin`, a real run **pauses new buy signals** and tells you in the run log and on Telegram. Exits keep going out. When the executor is heard again, buys resume and you are told. A heartbeat is only evidence of life: it cannot raise a limit, reset the breaker, lift the kill switch or confirm a position.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-paper-vs-real
|
|
3
|
+
title: Going real, safely › Paper vs real
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: Paper vs real
|
|
8
|
+
anchor: paper-vs-real
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#paper-vs-real
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- paper
|
|
14
|
+
- real
|
|
15
|
+
- going
|
|
16
|
+
- safely
|
|
17
|
+
confidence: high
|
|
18
|
+
owner: maintainers
|
|
19
|
+
origin: docs-generated
|
|
20
|
+
reviewed_by: generated@2026-10-16
|
|
21
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
22
|
+
sources:
|
|
23
|
+
- site/content/docs/going-real.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
When your executor's receipts carry fills (`priceUsd`, `sizeSol`, `tokens`), dexterm compares each one with its own paper fill for that signal:
|
|
28
|
+
- slippage, positive when the real fill was worse than paper;
|
|
29
|
+
- latency from the signal to its receipt;
|
|
30
|
+
- partial fills;
|
|
31
|
+
- rejections and failures, with their reasons.
|
|
32
|
+
|
|
33
|
+
This shows in `dexterm autotrade signal status`, `dexterm autotrade audit`, every run file's receipt rows and the digest. Use it to calibrate: if real fills land 4% worse than paper, the backtests and forward tests are 4% optimistic per trade. With few receipts the numbers say little, and the report says so.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-the-digest
|
|
3
|
+
title: Going real, safely › The digest
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: The digest
|
|
8
|
+
anchor: the-digest
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#the-digest
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- digest
|
|
14
|
+
- going
|
|
15
|
+
- real
|
|
16
|
+
- safely
|
|
17
|
+
confidence: high
|
|
18
|
+
owner: maintainers
|
|
19
|
+
origin: docs-generated
|
|
20
|
+
reviewed_by: generated@2026-10-16
|
|
21
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
22
|
+
sources:
|
|
23
|
+
- site/content/docs/going-real.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
`dexterm autotrade report [--period day|week] [--strategy ID]` prints, for each strategy and mode:
|
|
28
|
+
- the closed trades, and the win rate with its 95% interval;
|
|
29
|
+
- the net, and the max drawdown;
|
|
30
|
+
- refusals, the limits that were hit, and the limits that clamped a size;
|
|
31
|
+
- receipts and paper vs real fills;
|
|
32
|
+
- your executor's health.
|
|
33
|
+
|
|
34
|
+
It always ends with a note on the sample size. Five trades say almost nothing, and the interval shows how little.
|
|
35
|
+
|
|
36
|
+
`--telegram` sends it to your paired chat through your own bot. `--json` prints it as data. `dexterm autotrade report --schedule daily|weekly|off` makes a run with your bot on send it by itself: once a day after local midnight, or on Mondays. It is off by default.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-the-executor-kit
|
|
3
|
+
title: Going real, safely › The executor kit
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: The executor kit
|
|
8
|
+
anchor: the-executor-kit
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#the-executor-kit
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- executor
|
|
14
|
+
- kit
|
|
15
|
+
- going
|
|
16
|
+
- real
|
|
17
|
+
- safely
|
|
18
|
+
confidence: high
|
|
19
|
+
owner: maintainers
|
|
20
|
+
origin: docs-generated
|
|
21
|
+
reviewed_by: generated@2026-10-16
|
|
22
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
23
|
+
sources:
|
|
24
|
+
- site/content/docs/going-real.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
`dexterm autotrade executor kit --out ~/my-executor` copies three small executors, plain Node with no dependencies:
|
|
29
|
+
|
|
30
|
+
| file | channel | point dexterm at it |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `webhook-executor.mjs` | webhook (127.0.0.1 only) | `dexterm autotrade signal channels --webhook http://127.0.0.1:8787/signal` |
|
|
33
|
+
| `signal-cmd-executor.mjs` | command hook | `dexterm autotrade signal channels --signal-cmd '["/abs/path/node","/abs/path/signal-cmd-executor.mjs","--account","main"]'` |
|
|
34
|
+
| `jsonl-tail-executor.mjs` | the JSONL stream | `dexterm autotrade signal channels --jsonl on --jsonl-signed on` |
|
|
35
|
+
|
|
36
|
+
Each one handles every signal the same way:
|
|
37
|
+
|
|
38
|
+
1. It checks the HMAC (`--secret-file`, the file `dexterm autotrade signal secret generate --out FILE` writes).
|
|
39
|
+
2. It checks the account.
|
|
40
|
+
3. It ignores a repeat by nonce. The seen set survives a restart.
|
|
41
|
+
4. It ignores anything past its expiry.
|
|
42
|
+
5. It writes a receipt and sends a heartbeat.
|
|
43
|
+
|
|
44
|
+
They are **dry run**: they log what they would do, and their receipts say so. There is no wallet code, no key and no chain call in the kit. To trade, you replace one function (`act()` in `kit.mjs`) with your own code, or hand the order to the Telegram trading bot you chose. The kit's `telegram-bot-recipe.md` explains that set-up: a bot cannot read another bot's messages, so a small relay of yours hands each signal to the bot.
|
|
45
|
+
|
|
46
|
+
`--jsonl-signed on` writes each stream line as an envelope carrying the same HMAC as the webhook, so a stream reader can check it too.
|
|
47
|
+
|
|
48
|
+
**Prove it end to end:** `dexterm autotrade signal test` sends a signal marked `test: true` that names no coin, so there is nothing in it to trade. For each channel it shows whether the signal was delivered and how long that took, then your executor's receipt (`--wait SEC`, `--json`). The Telegram copy is for you, so it waits for the next run.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-the-whole-path
|
|
3
|
+
title: Going real, safely › The whole path
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: The whole path
|
|
8
|
+
anchor: the-whole-path
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#the-whole-path
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- whole
|
|
14
|
+
- path
|
|
15
|
+
- going
|
|
16
|
+
- real
|
|
17
|
+
- safely
|
|
18
|
+
confidence: high
|
|
19
|
+
owner: maintainers
|
|
20
|
+
origin: docs-generated
|
|
21
|
+
reviewed_by: generated@2026-10-16
|
|
22
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
23
|
+
sources:
|
|
24
|
+
- site/content/docs/going-real.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
> **0.2.0, experimental.** Real mode can lead to real trades in a wallet you fund. dexterm never holds a key, never signs and never sends a transaction. Your executor does, by its own rules. Not financial advice.
|
|
29
|
+
|
|
30
|
+
1. **Build and test on paper.** Make a strategy (from a preset, by chat, or in a file), backtest it on your recorded history, then forward-test it on paper on live data (`dexterm autotrade forward start my-strategy --hours 24`). Arming for real needs a completed forward test with at least 10 closed paper trades and a backtest (the evidence floor, `minForwardTrades`). Paper is the default for every new strategy.
|
|
31
|
+
2. **Wire up an executor, dry run.** Copy the executor kit (https://dexterm.xyz/docs/going-real#the-executor-kit), start one of its executors, point a channel at it, and send a test signal. Nothing can trade yet.
|
|
32
|
+
3. **Set your own limits.** `dexterm autotrade limits set …` (your limits (https://dexterm.xyz/docs/going-real#your-limits)). The defaults are placeholders, and your numbers win.
|
|
33
|
+
4. **Arm on your own terminal.** `dexterm autotrade signal arm my-strategy`. On a first arming dexterm asks for your numbers, then shows the evidence (backtest, forward test), the limits in force for this strategy and account, and your executor's health. Typing the phrase it shows confirms all of it. Below the evidence floor, or past a missing rung of the ladder, it refuses unless you first type a separate OVERRIDE phrase, which is journaled.
|
|
34
|
+
5. **Run it real.** `dexterm autotrade run my-strategy --real`, in the foreground (in 0.2.0 the always-on service runs paper strategies only). Every buy and sell goes to your executor as a LIVE TRADE FIRE signal (https://dexterm.xyz/docs/real-mode#the-signal), inside your limits. When no real run is running, no signal goes out, sells included: positions still open at the end are printed, listed in the `halted` signal and carried (https://dexterm.xyz/docs/real-mode#the-channels) to the next real run; until then, manage them in your executor.
|
|
35
|
+
6. **Watch and calibrate.** `signal status`, the `Q` screen and your Telegram chat show the limits, the executor's health and how far real fills land from paper. The digest (https://dexterm.xyz/docs/going-real#the-digest) sums it up each day or week.
|
|
36
|
+
|
|
37
|
+
At any point, `dexterm autotrade signal kill` stops every signal, sells included (one final `halted` still goes out, listing the positions still open; it closes nothing), and `dexterm autotrade signal disarm my-strategy` puts the strategy back on paper.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-what-dexterm-does-and-never-does
|
|
3
|
+
title: Going real, safely › What dexterm does, and never does
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: What dexterm does, and never does
|
|
8
|
+
anchor: what-dexterm-does-and-never-does
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#what-dexterm-does-and-never-does
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- dexterm
|
|
14
|
+
- does
|
|
15
|
+
- never
|
|
16
|
+
- going
|
|
17
|
+
- real
|
|
18
|
+
- safely
|
|
19
|
+
confidence: high
|
|
20
|
+
owner: maintainers
|
|
21
|
+
origin: docs-generated
|
|
22
|
+
reviewed_by: generated@2026-10-16
|
|
23
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
24
|
+
sources:
|
|
25
|
+
- site/content/docs/going-real.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**It does:**
|
|
30
|
+
- run your strategy exactly like paper;
|
|
31
|
+
- turn each trade into a signed, numbered, expiring signal for your executor, inside your limits;
|
|
32
|
+
- keep the signal until it is delivered;
|
|
33
|
+
- record what your executor reports;
|
|
34
|
+
- pause new buys when your executor is silent or a loss limit trips;
|
|
35
|
+
- tell you each time.
|
|
36
|
+
|
|
37
|
+
**It never:**
|
|
38
|
+
- holds, imports or asks for a key or a seed phrase;
|
|
39
|
+
- signs or sends a transaction, or builds one;
|
|
40
|
+
- lets a model, a tool or a chat tap arm real mode, change a limit, lift the kill switch or reset the breaker;
|
|
41
|
+
- trades a test signal;
|
|
42
|
+
- promises a fill or a profit.
|
|
43
|
+
|
|
44
|
+
Your executor decides, at its own price, with its own fees.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real-your-limits
|
|
3
|
+
title: Going real, safely › Your limits
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
heading: Your limits
|
|
8
|
+
anchor: your-limits
|
|
9
|
+
url: https://dexterm.xyz/docs/going-real#your-limits
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- going-real
|
|
13
|
+
- limits
|
|
14
|
+
- going
|
|
15
|
+
- real
|
|
16
|
+
- safely
|
|
17
|
+
confidence: high
|
|
18
|
+
owner: maintainers
|
|
19
|
+
origin: docs-generated
|
|
20
|
+
reviewed_by: generated@2026-10-16
|
|
21
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
22
|
+
sources:
|
|
23
|
+
- site/content/docs/going-real.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
Every number real mode enforces is yours. They live in one file, `~/.dexterm/autotrade/real/limits.json` (schema `dexterm-limits/1`; `dexterm autotrade limits schema` prints its JSON Schema), outside the model.
|
|
28
|
+
|
|
29
|
+
**Sizing:**
|
|
30
|
+
- `perTradeSol` and `perTradePct`: the most one buy may spend, in SOL or as a percent of the book. With both set, the smaller wins.
|
|
31
|
+
- `dailySol` and `buysPerDay`: what all buys may spend, and how many there may be, per local day.
|
|
32
|
+
- `maxOpenPositions`: counted across every real holding on this machine.
|
|
33
|
+
- `maxExposurePct`: everything open together, as a percent of the book.
|
|
34
|
+
- `minPositionSol` and `maxPositionSol`: no dust orders, and a cap on one position with its adds.
|
|
35
|
+
- `perCoinSolPerDay` and `perCoinBuysPerDay`: how much one coin may take in a day, re-entries included.
|
|
36
|
+
- `bookSol`: the size of YOUR account, which the percent limits use. Unset, they use the strategy's own book.
|
|
37
|
+
|
|
38
|
+
**Risk:**
|
|
39
|
+
- `dailyLossSol`: once the day's realized loss reaches it, no new buy goes out until tomorrow.
|
|
40
|
+
- `maxDrawdownSol`: the drawdown breaker. It stops new buys until you reset it with `dexterm autotrade limits breaker reset` (typed). The reset also lifts a loss-streak pause and starts the streak count again.
|
|
41
|
+
- `lossStreak` and `lossStreakPauseMin`: that many losing closes in a row pause new buys for that long.
|
|
42
|
+
- `maxHoldMinutes`: the stricter of this and each exit profile's own cap.
|
|
43
|
+
- `minLiquidityUsd` and `minMcapUsd`: floors on the coin. While one is set, an unknown value is refused.
|
|
44
|
+
- `maxSlippageBps` and `maxPriceImpactPct`: the tolerance a signal states. A buy is cut to the price-impact cap on the pool.
|
|
45
|
+
- `signalTtlSec`: how long your executor may act on a signal.
|
|
46
|
+
- `maxBuysPerMinute`: the signal rate limit.
|
|
47
|
+
|
|
48
|
+
**Sells:** never capped, unless you set `maxSellsPerMinute`. Only the kill switch stops exits.
|
|
49
|
+
|
|
50
|
+
**Evidence:** `minForwardTrades`, the evidence floor for arming: the closed paper trades a completed forward test of the strategy's exact rules must have, with a backtest on record. Lowering it or turning it `off` (no trade minimum; the completed forward test and the backtest are still needed) is a raise.
|
|
51
|
+
|
|
52
|
+
**Executor:** `executorSilenceMin`, how long your executor may be silent before new buys pause (see executor health (https://dexterm.xyz/docs/going-real#executor-health)).
|
|
53
|
+
|
|
54
|
+
Loss limits are counted on dexterm's own fills: the paper view of every signal.
|
|
55
|
+
|
|
56
|
+
**Scopes, and the stricter wins.**
|
|
57
|
+
- A number in `global` replaces the placeholder default. `off` turns a global limit off, which is a raise.
|
|
58
|
+
- `real` / `paper` (a mode), `strategy:<id>` and `account:<id>` can only tighten. Whichever scope sets the stricter number, that number is in force: a smaller cap, or a larger floor.
|
|
59
|
+
- Paper runs ignore limits unless you add a `paper` scope. Then a single paper run (`dexterm autotrade run <id> --paper`, a forward test included) obeys them too, the way a real run would, on its own state (it never touches real mode's counters). Limits are in SOL, so a paper replay with a `paper` scope needs `--sol-usd N`. Running several strategies at once (`run --all --paper`) does not apply the paper scope yet.
|
|
60
|
+
- The day's counters (buys, SOL spent, realized loss, per coin) count every real buy from this home: all strategies and accounts together. A `strategy:` or `account:` number is compared with that total, so it can only stop buys sooner, never later.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
dexterm autotrade limits show --strategy my-strategy --account main # what is in force, and where each number comes from
|
|
64
|
+
dexterm autotrade limits set perTradeSol=0.5 dailySol=2 dailyLossSol=0.4
|
|
65
|
+
dexterm autotrade limits set --scope strategy:my-strategy perTradePct=2 maxOpenPositions=1
|
|
66
|
+
dexterm autotrade limits explain maxExposurePct
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Lowering is free and immediate.** A running real run re-reads the file and uses the stricter of what it started with and what the file says now.
|
|
70
|
+
|
|
71
|
+
**Raising needs you.** `limits set` shows every change old -> new, marks each RAISE, and asks for a typed phrase with a one-time code on your own terminal. A pipe, a flag, an agent or MCP cannot give it. A raise applies from the next run.
|
|
72
|
+
|
|
73
|
+
**Hand edits.** If you edit `limits.json` by hand, a real run accepts the edit only when it lowers. One that raises anything is refused until you review it (`dexterm autotrade limits diff`) and accept it (`dexterm autotrade limits accept`, typed). Everything is journaled. Caps you set before 0.2.0 (`caps.json`) carry over as your global numbers, unless they differ from what dexterm last saved: then they count as a hand edit too.
|
|
74
|
+
|
|
75
|
+
**The placeholders** are 0.25 SOL a trade, 1 SOL a day, 20 buys a day, 3 open positions, a stop at -0.5 SOL a day, a pause after 5 losing closes in a row (60 min), at most 3 buys a minute, a pause when your executor is silent for 15 minutes, and an evidence floor of 10 closed paper trades. They are a cautious starting point, not advice. Real mode never arms on them silently: the first arming asks for your own numbers, and every arming shows the limits it confirms.
|
|
76
|
+
|
|
77
|
+
**The analyst can explain, never apply.** Ask it "why was that buy refused?" or "what would a 1 SOL daily cap change?". It reads the limits (`trading_limits`) and can propose a change as a diff card (`limits_propose`) with the exact command for you to run. No tool, chat command or model decision can change a limit.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-going-real
|
|
3
|
+
title: Going real, safely
|
|
4
|
+
kind: docs
|
|
5
|
+
page: going-real
|
|
6
|
+
page_title: Going real, safely
|
|
7
|
+
url: https://dexterm.xyz/docs/going-real
|
|
8
|
+
tags:
|
|
9
|
+
- docs
|
|
10
|
+
- going-real
|
|
11
|
+
- going
|
|
12
|
+
- real
|
|
13
|
+
- safely
|
|
14
|
+
confidence: high
|
|
15
|
+
owner: maintainers
|
|
16
|
+
origin: docs-generated
|
|
17
|
+
reviewed_by: generated@2026-10-16
|
|
18
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
19
|
+
sources:
|
|
20
|
+
- site/content/docs/going-real.md
|
|
21
|
+
date: 2026-10-16
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
The whole path from a paper strategy to real trades through your own executor. Your own limits on every number, a dry-run executor kit to wire up first, executor health, paper vs real fills, and the daily digest. What dexterm does, and what it never does. Experimental; not financial advice.
|
|
@@ -23,4 +23,4 @@ sources:
|
|
|
23
23
|
date: 2026-10-16
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
Earlier 0.1.7 test builds had an experimental local live signer with a dedicated trading wallet, and a LIVE trade ticket signed in Phantom. Both were removed before release, because dexterm should not hold a key. Sending
|
|
26
|
+
Earlier 0.1.7 test builds had an experimental local live signer with a dedicated trading wallet, and a LIVE trade ticket signed in Phantom. Both were removed before release, because dexterm should not hold a key. Sending a strategy's trades to an executor of your choice automatically is real mode (https://dexterm.xyz/docs/real-mode), new in 0.2.0, still with no key in dexterm.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-live-trading-real-mode-your-strategy-s-trades-to-your
|
|
3
|
+
title: Live trading › Real mode: your strategy's trades to your executor (0.2.0, experimental)
|
|
4
|
+
kind: docs
|
|
5
|
+
page: live-trading
|
|
6
|
+
page_title: Live trading
|
|
7
|
+
heading: Real mode: your strategy's trades to your executor (0.2.0, experimental)
|
|
8
|
+
anchor: real-mode-your-strategy-s-trades-to-your-executor-0-2-0-experimental
|
|
9
|
+
url: https://dexterm.xyz/docs/live-trading#real-mode-your-strategy-s-trades-to-your-executor-0-2-0-experimental
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- live-trading
|
|
13
|
+
- real
|
|
14
|
+
- mode
|
|
15
|
+
- strategy
|
|
16
|
+
- trades
|
|
17
|
+
- executor
|
|
18
|
+
- experimental
|
|
19
|
+
- live
|
|
20
|
+
- trading
|
|
21
|
+
confidence: high
|
|
22
|
+
owner: maintainers
|
|
23
|
+
origin: docs-generated
|
|
24
|
+
reviewed_by: generated@2026-10-16
|
|
25
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
26
|
+
sources:
|
|
27
|
+
- site/content/docs/live-trading.md
|
|
28
|
+
date: 2026-10-16
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
In real mode (https://dexterm.xyz/docs/real-mode) a strategy you armed on your own terminal sends every buy and sell it decides to your executor as a LIVE TRADE FIRE signal: a local webhook, a command, a stream file or MCP (a bot cannot read another bot's messages), with a copy in your Telegram chat. Your executor holds the wallet and acts on it; dexterm still holds no key and signs nothing. Hard caps, a kill switch (`dexterm autotrade signal kill`) and receipts of what your executor did are all on your machine. Experimental; not financial advice.
|
|
@@ -24,7 +24,7 @@ sources:
|
|
|
24
24
|
date: 2026-10-16
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
> **0.
|
|
27
|
+
> **0.2.0, experimental:** dexterm never holds a key and never signs. Live trades happen in the executor you choose (a Telegram trading bot behind your own relay, or any script): in real mode (https://dexterm.xyz/docs/real-mode) your strategy sends it a signal for each trade, and it acts by its own rules. Not financial advice.
|
|
28
28
|
|
|
29
29
|
- **dexterm never holds a key and never signs a transaction.** It has no trading wallet, no signer and no place to keep a private key. It builds no transaction and sends none.
|
|
30
30
|
- **Live trading happens in a Telegram trading bot of your choice.** That bot holds its own wallet and places the orders. You pick it, you fund it, and its rules and fees are its own.
|
package/dist/packages/mcp/assets/kb/docs/docs-live-trading-using-a-trading-bot-with-dexterm.md
CHANGED
|
@@ -29,5 +29,3 @@ date: 2026-10-16
|
|
|
29
29
|
2. Set up dexterm's own bot for your chat: `dexterm telegram setup`, then `dexterm telegram pair`. See Telegram (https://dexterm.xyz/docs/telegram). This is a separate bot that only talks to you.
|
|
30
30
|
3. Run a strategy on paper (`dexterm autotrade run <id> --paper`). Its alerts arrive in your chat.
|
|
31
31
|
4. When you want to act on one, do it in your trading bot.
|
|
32
|
-
|
|
33
|
-
dexterm has not been tested with any particular trading bot.
|
|
@@ -24,7 +24,7 @@ sources:
|
|
|
24
24
|
date: 2026-10-16
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
- It does not place an order in your trading bot for you. In
|
|
27
|
+
- It does not place an order in your trading bot for you. In real mode (https://dexterm.xyz/docs/real-mode) it sends your executor a signal; your executor places the order, by its own rules.
|
|
28
28
|
- It does not hold, import, create, decrypt or ask for a private key or seed phrase. Anything that asks you for one is not dexterm.
|
|
29
29
|
- It does not sign or send a transaction. `dexterm wallet link` only proves which wallet is yours with a signed **message** in Phantom; dexterm keeps the public key to show your address. It never asks Phantom to sign a transaction.
|
|
30
30
|
- It does not know what your trading bot did. Positions, fills and P/L in dexterm are paper.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-real-mode-receipts-what-your-executor-did
|
|
3
|
+
title: Real mode (LIVE TRADE FIRE signals) › Receipts: what your executor did
|
|
4
|
+
kind: docs
|
|
5
|
+
page: real-mode
|
|
6
|
+
page_title: Real mode (LIVE TRADE FIRE signals)
|
|
7
|
+
heading: Receipts: what your executor did
|
|
8
|
+
anchor: receipts-what-your-executor-did
|
|
9
|
+
url: https://dexterm.xyz/docs/real-mode#receipts-what-your-executor-did
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- real-mode
|
|
13
|
+
- receipts
|
|
14
|
+
- executor
|
|
15
|
+
- did
|
|
16
|
+
- real
|
|
17
|
+
- mode
|
|
18
|
+
- live
|
|
19
|
+
- trade
|
|
20
|
+
- fire
|
|
21
|
+
- signals
|
|
22
|
+
confidence: high
|
|
23
|
+
owner: maintainers
|
|
24
|
+
origin: docs-generated
|
|
25
|
+
reviewed_by: generated@2026-10-16
|
|
26
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
27
|
+
sources:
|
|
28
|
+
- site/content/docs/real-mode.md
|
|
29
|
+
date: 2026-10-16
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
dexterm cannot see your executor's wallet trades, so a real position stays **unconfirmed** until a receipt arrives. A receipt is data only: it never makes dexterm buy, sell or change anything.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
dexterm autotrade receipt 42 executed --size-sol 0.049 --price 0.00121 --tokens 40500 --tx <signature>
|
|
36
|
+
dexterm autotrade receipt 43 rejected --reason "slippage too high"
|
|
37
|
+
dexterm autotrade receipt list
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Your executor can also append one line per signal to `~/.dexterm/autotrade/real/receipts.jsonl`: `{"schema":"dexterm-trade-receipt/1","signalId":"…","nonce":42,"accountId":"main","status":"executed","at":1792000004000,"fill":{"priceUsd":0.00121,"sizeSol":0.049,"tokens":40500,"txSig":"…"},"reason":null,"executor":"my-bot"}`. A receipt for an unknown nonce, another account or a mismatched id is counted and ignored.
|
|
41
|
+
|
|
42
|
+
The exits keep firing on dexterm's own view of the market whether or not a receipt came. A receipt with a fill also says how far the real fill landed from dexterm's paper fill (paper vs real (https://dexterm.xyz/docs/going-real#paper-vs-real)). The drift between signals and receipts (unconfirmed, rejected, failed, filled size and price against the signal) shows in `receipt list`, `signal status`, `dexterm autotrade audit` and the run file (receipt rows). `dexterm autotrade signal reconcile --wallet <your PUBLIC address>` reads that address's SOL balance and token holdings (two read-only calls) and lists the coins the real book holds that the wallet does not, and back. It never takes a key.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-real-mode-safety
|
|
3
|
+
title: Real mode (LIVE TRADE FIRE signals) › Safety
|
|
4
|
+
kind: docs
|
|
5
|
+
page: real-mode
|
|
6
|
+
page_title: Real mode (LIVE TRADE FIRE signals)
|
|
7
|
+
heading: Safety
|
|
8
|
+
anchor: safety
|
|
9
|
+
url: https://dexterm.xyz/docs/real-mode#safety
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- real-mode
|
|
13
|
+
- safety
|
|
14
|
+
- real
|
|
15
|
+
- mode
|
|
16
|
+
- live
|
|
17
|
+
- trade
|
|
18
|
+
- fire
|
|
19
|
+
- signals
|
|
20
|
+
confidence: high
|
|
21
|
+
owner: maintainers
|
|
22
|
+
origin: docs-generated
|
|
23
|
+
reviewed_by: generated@2026-10-16
|
|
24
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
25
|
+
sources:
|
|
26
|
+
- site/content/docs/real-mode.md
|
|
27
|
+
date: 2026-10-16
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
- **Only you switch a strategy to real**, on your own terminal, with the typed phrase. A model cannot: the mode is on the list of fields only you may change, the agent's decisions have no such verb, no MCP tool arms, and a file edited by hand to `"mode": "real"` is not armed. Arming, an evidence override, disarming, caps and the kill switch are all journaled in `~/.dexterm/autotrade/real/journal.jsonl`.
|
|
31
|
+
- **The limits live outside the model** (all of them (https://dexterm.xyz/docs/going-real#your-limits)). A buy is cut to the per-trade, position, exposure and price-impact limits. A buy over the daily SOL, buys per day, per coin or open positions limit is refused (open positions means every real holding on this machine, whichever run opened it). So is a buy after a loss stop, the drawdown breaker or a loss streak, or while your executor is silent. Sells are never blocked by a limit unless you set the optional sell rate, so an exit always goes out.
|
|
32
|
+
- **The real-mode kill switch**: `dexterm autotrade signal kill` stops every trade-fire signal at once, sells included. It never closes a position: it prints the open ones, and a running real run halts at its next tick and sends one `halted` that lists them for your executor. `dexterm autotrade signal unkill` (typed confirmation) lifts it. The panic switch (`dexterm wallet panic`) halts real runs too: no new entries, exits keep going out.
|
|
33
|
+
- **Chat approvals stay paper.** A one-tap approval never authorises a real signal: a strategy that waits for a tap (`entry.decide: "agent+approve"`, or `dexterm telegram approvals on`) does not start in real mode. Your executor is the last gate.
|
|
34
|
+
- The prompt firewall, the strategy clamp and the session caps apply exactly as on paper.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-real-mode-set-it-up
|
|
3
|
+
title: Real mode (LIVE TRADE FIRE signals) › Set it up
|
|
4
|
+
kind: docs
|
|
5
|
+
page: real-mode
|
|
6
|
+
page_title: Real mode (LIVE TRADE FIRE signals)
|
|
7
|
+
heading: Set it up
|
|
8
|
+
anchor: set-it-up
|
|
9
|
+
url: https://dexterm.xyz/docs/real-mode#set-it-up
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- real-mode
|
|
13
|
+
- set
|
|
14
|
+
- real
|
|
15
|
+
- mode
|
|
16
|
+
- live
|
|
17
|
+
- trade
|
|
18
|
+
- fire
|
|
19
|
+
- signals
|
|
20
|
+
confidence: high
|
|
21
|
+
owner: maintainers
|
|
22
|
+
origin: docs-generated
|
|
23
|
+
reviewed_by: generated@2026-10-16
|
|
24
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
25
|
+
sources:
|
|
26
|
+
- site/content/docs/real-mode.md
|
|
27
|
+
date: 2026-10-16
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
1. **A channel your executor can read** (one or more), saved next to your Telegram setup (https://dexterm.xyz/docs/telegram) in `connectors.json`:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
dexterm autotrade signal channels --webhook http://127.0.0.1:8787/fire
|
|
34
|
+
dexterm autotrade signal channels --signal-cmd '["/usr/local/bin/my-executor","--fast"]'
|
|
35
|
+
dexterm autotrade signal channels --jsonl on
|
|
36
|
+
dexterm autotrade signal channels --mcp on
|
|
37
|
+
dexterm autotrade signal channels --telegram on --ttl 60
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`off` turns one off. `dexterm telegram status` shows the channels too.
|
|
41
|
+
2. **A webhook secret** (recommended for the webhook): `dexterm autotrade signal secret generate --out /path/for/your/executor.secret` makes a random secret, keeps it in your keychain (like the bot token) and writes it to that file (0600) for your executor. It is never printed. `secret set` reads one from a pipe; `secret remove` deletes it.
|
|
42
|
+
3. **Your limits**: `dexterm autotrade limits set perTradeSol=0.25 dailySol=1 buysPerDay=20 maxOpenPositions=3 dailyLossSol=0.5`, and any of the others (Going real, safely (https://dexterm.xyz/docs/going-real#your-limits)): per trade in SOL or % of book, exposure, position size, per coin, loss stops, the drawdown breaker, max hold, floors, slippage, TTL, rate. You can set them globally, per mode, per strategy or per account, and the stricter wins. Raising any of them asks for a typed confirmation on your terminal; lowering does not. The numbers shown are placeholders. `signal caps set --per-trade-sol …` still sets the first four.
|
|
43
|
+
4. **Arm the strategy** on your own terminal: `dexterm autotrade signal arm my-strategy [--account main]`. On a first arming it asks for your own limits (Enter keeps a placeholder). Then you see the evidence panel: the last backtest of this version, a forward-test report if there is one, the limits in force for this strategy and account, your executor's health and the channels. Then you type the phrase it shows, which confirms those limits, with its one-time code (`REAL my-strategy 7KQ4`). **The evidence floor**: arming needs a completed forward test of these exact rules with at least 10 closed paper trades (your limit `minForwardTrades`) and a backtest on record. Below it, or when arming now would skip a rung of the ladder (https://dexterm.xyz/docs/build-a-strategy-by-chat#the-ladder), arming refuses and says what is missing; only you can go on anyway, by first typing a separate phrase it shows (`OVERRIDE my-strategy 3HXR`, its own one-time code). The override is journaled. No model, tool, flag or pipe can give it. Arming saves the strategy as a new version in mode `real`, and the arming is bound to that exact version: any later edit disarms it. Presets cannot be armed; copy one with `dexterm autotrade new` first.
|
|
44
|
+
5. **Test the channels**: `dexterm autotrade signal test` sends a `test` signal (`test: true`, no coin: nothing to trade) through each channel and shows, per channel, delivered or not, the latency, and your executor's receipt. The dry-run executor kit (https://dexterm.xyz/docs/going-real#the-executor-kit) answers it out of the box.
|
|
45
|
+
6. **Run it**: `dexterm autotrade run my-strategy --real`. In 0.2.0 real mode runs **in the foreground only**: the always-on service runs paper strategies, never a real one. Real mode runs on live data only (a replay would send old prices to your executor). `--sol-usd N` fixes the SOL price for sizes in SOL; without it dexterm reads SOL/USD from DexScreener (keyless) and refuses to start without one.
|
|
46
|
+
|
|
47
|
+
`dexterm autotrade signal disarm my-strategy` puts it back on paper. `dexterm autotrade run my-strategy --paper` runs a real strategy's paper twin: no signal goes out. `run --all` stays paper: a real strategy runs on its own.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-real-mode-the-channels
|
|
3
|
+
title: Real mode (LIVE TRADE FIRE signals) › The channels
|
|
4
|
+
kind: docs
|
|
5
|
+
page: real-mode
|
|
6
|
+
page_title: Real mode (LIVE TRADE FIRE signals)
|
|
7
|
+
heading: The channels
|
|
8
|
+
anchor: the-channels
|
|
9
|
+
url: https://dexterm.xyz/docs/real-mode#the-channels
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- real-mode
|
|
13
|
+
- channels
|
|
14
|
+
- real
|
|
15
|
+
- mode
|
|
16
|
+
- live
|
|
17
|
+
- trade
|
|
18
|
+
- fire
|
|
19
|
+
- signals
|
|
20
|
+
confidence: high
|
|
21
|
+
owner: maintainers
|
|
22
|
+
origin: docs-generated
|
|
23
|
+
reviewed_by: generated@2026-10-16
|
|
24
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
25
|
+
sources:
|
|
26
|
+
- site/content/docs/real-mode.md
|
|
27
|
+
date: 2026-10-16
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
| Channel | How your executor gets it | What counts as delivered |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| webhook | `POST` of the line to `http://127.0.0.1`, `localhost` or `[::1]` on any port, or to an `https://` URL of yours. Headers `x-dexterm-signature`, `x-dexterm-nonce`, `idempotency-key`. Redirects are refused. | 2xx; 409 means "already have it". 408, 425, 429, 5xx or no answer is retried; any other 4xx is a rejection. |
|
|
33
|
+
| `--signal-cmd` | Your program is started with its argv (an absolute path; no shell, no PATH lookup), the line on stdin, a minimal environment (`DEXTERM_SIGNAL_NONCE`, `DEXTERM_SIGNAL_ID`, `DEXTERM_SIGNAL_SIGNATURE` when a secret is set; nothing else of dexterm's). 10 seconds per call. | exit 0; exit 3 means "already have it"; exit 2 is a rejection; anything else is retried. |
|
|
34
|
+
| JSONL stream | One line per signal appended to `~/.dexterm/autotrade/real/signals.jsonl` (0600), or the path you set. Tail it. | the line is written. |
|
|
35
|
+
| MCP | The read-only MCP tool `trade_fire_feed` returns the signals after a nonce, plus real mode's state. | the line is written to the feed. |
|
|
36
|
+
| Telegram | A `LIVE TRADE FIRE` message to your paired chat, as plain text. For you to read, not for your executor. | Telegram accepted it. |
|
|
37
|
+
|
|
38
|
+
**Delivery.** A signal is written to the outbox (`~/.dexterm/autotrade/real/outbox.jsonl`) before its fill is booked, so the book never holds anything a signal did not announce. Each channel gets the signals in nonce order, retried with backoff from 1 second up to 30, until it acks, rejects one, or the signal expires (then it is marked expired and never sent late). A restart picks the outbox up where it stopped; nothing is sent twice on purpose, and your executor dedupes the rest by nonce. One process writes the outbox at a time. `dexterm autotrade signal flush` delivers what is pending, and `signal tail` lists the newest signals with their delivery and receipt state.
|
|
39
|
+
|
|
40
|
+
**The dead-man.** Every signal carries its TTL. A run that ends, halts or is killed sends one final `halted` signal with its outstanding nonces. A runner that dies without one (a crash, a power cut) gets its `halted`, with the reason `runner-lost`, the next time the outbox opens: the next real run or `dexterm autotrade signal flush`.
|
|
41
|
+
|
|
42
|
+
**A run that ends holding a position.** Ending a real run (its time limit, Ctrl-C, a stop, the kill switch, a halt, a crash) does not sell anything: what is still open is carried. dexterm keeps its real holdings in `~/.dexterm/autotrade/real/held.json`, across runs. You cannot miss them: the run's last lines print the open coins (`REAL POSITIONS STILL OPEN`), the final `halted` signal lists them in `open`, and its Telegram copy says "these positions are still open: manage them in your executor". **When no real run is running, NO signals go out, sells included**: an open position gets no exit from dexterm until the next real run of its strategy, so manage it in your executor. The next real run of the same strategy and account takes them over and their exits keep firing, so a carried coin still gets its sell signal. A carried coin is never bought again while it is held, it counts against the open-position cap, and a coin another strategy holds is not bought. `dexterm autotrade signal held` lists the holdings; if you closed one yourself in your executor, `dexterm autotrade signal release <mint>` (typed confirmation) forgets it.
|