dexterm-cli 0.1.6 → 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/schema.js +22 -1
- package/dist/packages/agents/src/spectator.js +3 -1
- package/dist/packages/agents/src/story.js +11 -2
- package/dist/packages/agents/src/tiers.js +36 -2
- package/dist/packages/agents/src/tools.js +35 -2
- package/dist/packages/autotrade/assets/exit-profile.schema.json +492 -0
- package/dist/packages/autotrade/assets/limits.schema.json +569 -0
- package/dist/packages/autotrade/assets/profiles/moonbag.json +46 -0
- package/dist/packages/autotrade/assets/profiles/runner.json +88 -0
- package/dist/packages/autotrade/assets/profiles/scalp.json +88 -0
- package/dist/packages/autotrade/assets/profiles/swing.json +88 -0
- package/dist/packages/autotrade/assets/strategies/moonbag.json +101 -0
- package/dist/packages/autotrade/assets/strategies/runner.json +101 -0
- package/dist/packages/autotrade/assets/strategies/sample-dip-ladder.json +188 -0
- package/dist/packages/autotrade/assets/strategies/scalp.json +98 -0
- package/dist/packages/autotrade/assets/strategies/swing.json +97 -0
- package/dist/packages/autotrade/assets/strategies/yolo.json +157 -0
- package/dist/packages/autotrade/assets/tapes/yolo-rehearsal.json +1 -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/account.js +74 -0
- package/dist/packages/autotrade/src/backtest.js +358 -0
- package/dist/packages/autotrade/src/basis-text.js +32 -0
- package/dist/packages/autotrade/src/chat/approvals.js +484 -0
- package/dist/packages/autotrade/src/chat/audit.js +140 -0
- package/dist/packages/autotrade/src/chat/config.js +95 -0
- package/dist/packages/autotrade/src/chat/connector.js +24 -0
- package/dist/packages/autotrade/src/chat/control.js +104 -0
- package/dist/packages/autotrade/src/chat/fake.js +100 -0
- package/dist/packages/autotrade/src/chat/format.js +71 -0
- package/dist/packages/autotrade/src/chat/hub.js +187 -0
- package/dist/packages/autotrade/src/chat/index.js +18 -0
- package/dist/packages/autotrade/src/chat/notify.js +302 -0
- package/dist/packages/autotrade/src/chat/pairing.js +46 -0
- package/dist/packages/autotrade/src/chat/redact.js +48 -0
- package/dist/packages/autotrade/src/chat/secrets.js +106 -0
- package/dist/packages/autotrade/src/chat/service.js +251 -0
- package/dist/packages/autotrade/src/chat/telegram.js +290 -0
- package/dist/packages/autotrade/src/desk-executor.js +188 -0
- package/dist/packages/autotrade/src/engine.js +401 -0
- package/dist/packages/autotrade/src/execution-port.js +97 -0
- package/dist/packages/autotrade/src/executor-health.js +217 -0
- package/dist/packages/autotrade/src/fleet-config.js +169 -0
- package/dist/packages/autotrade/src/fleet-control.js +276 -0
- package/dist/packages/autotrade/src/fleet.js +642 -0
- package/dist/packages/autotrade/src/forward.js +355 -0
- package/dist/packages/autotrade/src/index.js +72 -0
- package/dist/packages/autotrade/src/journey.js +477 -0
- package/dist/packages/autotrade/src/ledger.js +108 -0
- package/dist/packages/autotrade/src/limits.js +682 -0
- package/dist/packages/autotrade/src/live-source.js +182 -0
- package/dist/packages/autotrade/src/monitor-daemon.js +715 -0
- package/dist/packages/autotrade/src/monitor.js +190 -0
- package/dist/packages/autotrade/src/ollama-sessions.js +137 -0
- package/dist/packages/autotrade/src/outbox.js +394 -0
- package/dist/packages/autotrade/src/paper-accounts.js +72 -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/replay.js +198 -0
- package/dist/packages/autotrade/src/report.js +168 -0
- package/dist/packages/autotrade/src/runner-config.js +99 -0
- package/dist/packages/autotrade/src/runner.js +923 -0
- package/dist/packages/autotrade/src/safety.js +243 -0
- 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/session.js +269 -0
- package/dist/packages/autotrade/src/sessions.js +503 -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/store.js +250 -0
- package/dist/packages/autotrade/src/strategy.js +258 -0
- package/dist/packages/autotrade/src/trade-ledger.js +241 -0
- package/dist/packages/autotrade/src/yolo.js +140 -0
- package/dist/packages/cli/assets/claude/analyst-system.md +4 -4
- package/dist/packages/cli/assets/claude/plugin/skills/token-dossier/SKILL.md +1 -1
- package/dist/packages/cli/src/ai-cmd.js +412 -0
- package/dist/packages/cli/src/analyst/backend.js +83 -15
- package/dist/packages/cli/src/analyst/codex.js +15 -9
- package/dist/packages/cli/src/analyst/ollama.js +263 -0
- package/dist/packages/cli/src/analyst/session.js +5 -2
- package/dist/packages/cli/src/app-help-gen.js +56 -8
- package/dist/packages/cli/src/autotrade-cmd/audit.js +74 -0
- package/dist/packages/cli/src/autotrade-cmd/backtest.js +216 -0
- package/dist/packages/cli/src/autotrade-cmd/executor.js +91 -0
- package/dist/packages/cli/src/autotrade-cmd/flatten.js +64 -0
- package/dist/packages/cli/src/autotrade-cmd/fleet.js +401 -0
- 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/requests.js +79 -0
- package/dist/packages/cli/src/autotrade-cmd/run.js +657 -0
- 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/stop.js +76 -0
- package/dist/packages/cli/src/autotrade-cmd/strategies.js +198 -0
- package/dist/packages/cli/src/autotrade-cmd/strategy-control.js +174 -0
- package/dist/packages/cli/src/autotrade-cmd/telegram-host.js +101 -0
- package/dist/packages/cli/src/autotrade-cmd.js +214 -0
- package/dist/packages/cli/src/display.js +156 -17
- package/dist/packages/cli/src/doctor.js +62 -3
- package/dist/packages/cli/src/export.js +10 -2
- package/dist/packages/cli/src/index.js +1 -1
- package/dist/packages/cli/src/ledger-cmd.js +290 -0
- package/dist/packages/cli/src/live/chart-fills.js +46 -0
- package/dist/packages/cli/src/live/index.js +23 -89
- package/dist/packages/cli/src/live/screens/token-live.js +9 -6
- package/dist/packages/cli/src/live/trade.js +12 -457
- package/dist/packages/cli/src/live/watchlist.js +1 -1
- package/dist/packages/cli/src/main.js +147 -190
- package/dist/packages/cli/src/mcp-cmd.js +7 -1
- package/dist/packages/cli/src/plan-cmd.js +1 -1
- package/dist/packages/cli/src/pnl-app.js +31 -21
- package/dist/packages/cli/src/pnl-card.js +162 -21
- package/dist/packages/cli/src/popup.js +22 -6
- package/dist/packages/cli/src/record-cmd.js +141 -20
- package/dist/packages/cli/src/screens/agent-hud.js +34 -2
- package/dist/packages/cli/src/screens/analyst-session.js +7 -4
- package/dist/packages/cli/src/screens/analyst.js +3 -2
- package/dist/packages/cli/src/screens/autotrade-journey.js +134 -0
- package/dist/packages/cli/src/screens/autotrade-keys.js +182 -0
- package/dist/packages/cli/src/screens/autotrade-proposals.js +123 -0
- package/dist/packages/cli/src/screens/autotrade-screen.js +776 -0
- package/dist/packages/cli/src/screens/autotrade-ui.js +650 -0
- package/dist/packages/cli/src/screens/autotrade-worker.js +91 -0
- package/dist/packages/cli/src/screens/brain.js +37 -11
- package/dist/packages/cli/src/screens/overlay.js +5 -2
- package/dist/packages/cli/src/screens/plans.js +5 -17
- package/dist/packages/cli/src/screens/pnl-chip.js +9 -8
- package/dist/packages/cli/src/screens/positions.js +6 -28
- package/dist/packages/cli/src/screens/ticket.js +38 -205
- package/dist/packages/cli/src/screens/token.js +3 -3
- package/dist/packages/cli/src/state.js +25 -19
- package/dist/packages/cli/src/telegram-cmd.js +454 -0
- package/dist/packages/cli/src/trade.js +3 -128
- package/dist/packages/cli/src/version.js +1 -1
- package/dist/packages/cli/src/wallet-cmd.js +39 -340
- package/dist/packages/cli/src/wallet-command.js +8 -11
- package/dist/packages/cli/src/widgets.js +0 -12
- package/dist/packages/custom/src/config.js +20 -2
- package/dist/packages/custom/src/schema.js +35 -10
- package/dist/packages/custom/src/workspace.js +3 -3
- package/dist/packages/data/src/basis.js +191 -0
- package/dist/packages/data/src/detail.js +53 -2
- package/dist/packages/data/src/index.js +0 -14
- package/dist/packages/data/src/store.js +14 -5
- package/dist/packages/data/src/trade/agent/paper-desk.js +228 -16
- package/dist/packages/data/src/trade/agent/rendezvous.js +3 -2
- package/dist/packages/data/src/trade/bridge.js +4 -102
- package/dist/packages/data/src/trade/ledger/export.js +101 -0
- package/dist/packages/data/src/trade/ledger/file.js +135 -0
- package/dist/packages/data/src/trade/ledger/fold.js +191 -0
- package/dist/packages/data/src/trade/ledger/index.js +9 -0
- package/dist/packages/data/src/trade/ledger/schema.js +83 -0
- package/dist/packages/data/src/trade/ledger/sources.js +307 -0
- package/dist/packages/data/src/trade/ledger/stats.js +123 -0
- package/dist/packages/data/src/trade/ledger/tags.js +116 -0
- package/dist/packages/data/src/trade/ledger/view.js +51 -0
- package/dist/packages/data/src/trade/plans/index.js +0 -1
- package/dist/packages/data/src/trade/plans/service.js +3 -27
- package/dist/packages/mcp/assets/kb/app-help/autotrade-chat.md +48 -0
- 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-parallel.md +42 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-real-signal.md +45 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-runner.md +35 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-stop.md +37 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-strategies.md +35 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-telegram.md +40 -0
- package/dist/packages/mcp/assets/kb/app-help/chart-trade-markers.md +42 -0
- package/dist/packages/mcp/assets/kb/app-help/link-a-wallet.md +4 -10
- package/dist/packages/mcp/assets/kb/app-help/live-trading.md +38 -0
- package/dist/packages/mcp/assets/kb/app-help/live-yolo.md +34 -0
- package/dist/packages/mcp/assets/kb/app-help/order-plans.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/price-or-marketcap.md +5 -2
- package/dist/packages/mcp/assets/kb/app-help/screen-analyst.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-autotrade.md +229 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-kol.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-newpairs.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-positions.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-screener.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-token.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-trending.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-watchlist.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/standing-mandates.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/trade-ledger.md +54 -0
- package/dist/packages/mcp/assets/kb/app-help/use-local-model.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-agents-agent-paper-trading.md +4 -1
- package/dist/packages/mcp/assets/kb/docs/docs-agents-reading-your-trade-ledger.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-agents-untrusted-by-default.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-analyst-if-claude-is-missing.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-analyst-use-a-local-model-instead.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-analyst-what-it-sees.md +2 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-backtests-and-their-limits.md +56 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-change-a-strategy-by-chat.md +51 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-checking-the-record-of-a-run.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-comparing-them.md +41 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-exits-and-wakes.md +76 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-how-a-stop-reaches-the-runner.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-on-the-q-screen.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-one-strategy-or-all-of-them.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-paper-accounts.md +50 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-presets.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-running-it-all-day.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-sessions-and-their-limits.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-several-strategies-at-once.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-stopping-it.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-strategies-and-presets.md +34 -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-the-autotrade-json-file.md +48 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-heartbeat.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-run-file-and-the-heartbeat.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-runner-and-candidate-sessions.md +45 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-each-session-shows-first.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-costs-claude-usage-per-session.md +58 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-is-paper-self-directed.md +50 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-will-not-do.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-which-account-day-caps-and-the-usage-guard.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-your-strategies.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade.md +22 -0
- 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.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-configuration-chart-markers.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-chart-y-axis.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-environment-variables.md +4 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-files-on-disk.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-headless-recorder-dexterm-record.md +3 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-price-display-mode.md +8 -6
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading-stage-2-the-one-key-mirror-ticket-a-proposal.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading-stage-3-capped-auto-mirror-default-off-less.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading-what-is-proven-what-is-not.md +1 -1
- 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 +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-data-sources-sources.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-first-run.md +1 -1
- 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-getting-started.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 +26 -0
- 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-stopping.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-the-short-version.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-using-a-trading-bot-with-dexterm.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-what-dexterm-does-not-do.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-what-dexterm-does.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading.md +23 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-another-machine.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-autotrade-on-a-local-model.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-check-your-model-dexterm-ai-probe.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-how-we-checked.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-models-without-tool-calling.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-pick-the-engine-globally-or-per-surface.md +43 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-restriction-profiles.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-set-it-up-in-two-minutes.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-troubleshooting.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-what-runs-on-a-local-model.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-what-stays-outside-the-model.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-which-model.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-your-own-agent-on-the-local-model.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-letting-an-agent-paper-trade-experimental.md +3 -4
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-link-a-wallet-read-only.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-order-plans-and-standing-mandates.md +3 -4
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-panic.md +4 -7
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-paper-only-mandates.md +6 -7
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-pnl-cards.md +7 -7
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-safety-model.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-ticket.md +3 -4
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-trade-ledger.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-wallet.md +4 -5
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-trade-moments.md +4 -5
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading.md +4 -5
- package/dist/packages/mcp/assets/kb/docs/docs-popup-chart-buy-and-sell-markers.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-popup-chart-what-it-shows.md +2 -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-screens-autotrade-paper.md +26 -0
- package/dist/packages/mcp/assets/kb/docs/docs-screens-order-plans.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-screens-token-screen.md +2 -0
- package/dist/packages/mcp/assets/kb/docs/docs-spectator-the-brain-view-and-the-pnl-chip.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-approve-one-tap-entries.md +50 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-control-the-commands.md +43 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-if-something-goes-wrong.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-notify-what-reaches-your-phone.md +41 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-set-it-up.md +47 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-the-record.md +26 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-is.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-will-not-do.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram.md +23 -0
- package/dist/packages/mcp/assets/kb/docs/docs-troubleshooting-common-questions.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-troubleshooting-doctor-lines.md +4 -0
- package/dist/packages/mcp/assets/kb/docs/docs-voice-linux-and-windows.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-voice.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-1-replay-it-on-your-own-history.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-2-run-it-on-paper.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-3-watch-it-and-stop-it.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-the-rules.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-what-it-is.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-what-it-will-not-do.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo.md +26 -0
- package/dist/packages/mcp/assets/kb/entries/autotrade.md +40 -0
- package/dist/packages/mcp/src/app-help.js +1 -1
- package/dist/packages/mcp/src/autotrade-tools.js +1107 -0
- package/dist/packages/mcp/src/backtest-requests.js +71 -0
- package/dist/packages/mcp/src/engine/config.js +159 -0
- package/dist/packages/mcp/src/engine/index.js +10 -0
- package/dist/packages/mcp/src/engine/loop.js +101 -0
- package/dist/packages/mcp/src/engine/mcp-client.js +123 -0
- package/dist/packages/mcp/src/engine/ollama.js +258 -0
- package/dist/packages/mcp/src/engine/probe.js +110 -0
- package/dist/packages/mcp/src/engine/reason.js +35 -0
- package/dist/packages/mcp/src/engine/restrictions.js +111 -0
- package/dist/packages/mcp/src/index.js +7 -1
- package/dist/packages/mcp/src/ledger-tools.js +494 -0
- package/dist/packages/mcp/src/paper-agent.js +2 -0
- package/dist/packages/mcp/src/server.js +138 -19
- package/dist/packages/packs/src/backtest.js +3 -1
- package/dist/packages/popup/src/pages/chart-lib.js +134 -21
- package/dist/packages/popup/src/pages/chart.css +9 -0
- package/dist/packages/popup/src/pages/chart.html +3 -1
- package/dist/packages/popup/src/pages/chart.js +104 -7
- package/dist/packages/popup/src/protocol.js +2 -0
- package/dist/packages/popup/src/server.js +4 -0
- package/dist/packages/recorder/src/index.js +2 -0
- package/dist/packages/recorder/src/recorder.js +63 -6
- package/dist/packages/recorder/src/retention.js +100 -0
- package/dist/packages/recorder/src/schema.js +34 -1
- package/dist/packages/recorder/src/ticks.js +237 -0
- package/dist/packages/tui/src/index.js +1 -0
- package/dist/packages/tui/src/keymap.js +28 -1
- package/dist/packages/tui/src/markers.js +219 -0
- package/dist/packages/tui/src/widgets.js +149 -2
- package/package.json +2 -1
- package/dist/packages/data/src/trade/caps.js +0 -323
- package/dist/packages/data/src/trade/executor.js +0 -933
- package/dist/packages/data/src/trade/plans/executor-live.js +0 -220
- package/dist/packages/data/src/trade/rpc-exec.js +0 -229
- package/dist/packages/data/src/trade/signer/client.js +0 -197
- package/dist/packages/data/src/trade/signer/fast-wallet.js +0 -154
- package/dist/packages/data/src/trade/signer/host.js +0 -97
- package/dist/packages/data/src/trade/signer/main.js +0 -121
- package/dist/packages/data/src/trade/signer/probe-builder.js +0 -85
- package/dist/packages/data/src/trade/signer/protocol.js +0 -92
- package/dist/packages/data/src/trade/signer/service.js +0 -400
- package/dist/packages/data/src/trade/signer/sol-usd-feed.js +0 -98
- package/dist/packages/data/src/trade/sol-usd.js +0 -86
- package/dist/packages/data/src/trade/swap-build.js +0 -108
- package/dist/packages/data/src/trade/token-delta.js +0 -201
- package/dist/packages/data/vendor/solana-web3/LICENSE +0 -20
- package/dist/packages/data/vendor/solana-web3/NOTICE.md +0 -13
- package/dist/packages/data/vendor/solana-web3/index.iife.min.js +0 -20
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-a-live-ticket.md +0 -42
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-before-you-press-size-vs-caps.md +0 -34
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-devnet-signer-mainnet-token.md +0 -35
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-jupiter-rate-limits.md +0 -33
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-link-a-wallet.md +0 -32
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-live-trading-devnet-first.md +0 -30
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-mainnet.md +0 -31
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-live-fire-path-devnet-the-fast-wallet.md +0 -41
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-signer-process.md +0 -34
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-what-the-live-path-keeps.md +0 -37
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-your-first-live-trade.md +0 -41
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-change-a-strategy-by-chat
|
|
3
|
+
title: Autotrade (paper) › Change a strategy by chat
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Change a strategy by chat
|
|
8
|
+
anchor: change-a-strategy-by-chat
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#change-a-strategy-by-chat
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- change
|
|
14
|
+
- strategy
|
|
15
|
+
- chat
|
|
16
|
+
- paper
|
|
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/autotrade.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
Ask the analyst (`a`) to change one of your strategies in plain words, for example "make my swing exit faster" or "fewer entries a day on my copy of moonbag". The analyst can read your strategies and backtest them, but it can only **propose** a change: nothing it says changes a file.
|
|
28
|
+
|
|
29
|
+
A proposal is a small set of field changes (at most 20) with a one-line reason. Before you see it, dexterm applies it to a copy, validates the result like any strategy, and compares every risk number with the current version:
|
|
30
|
+
|
|
31
|
+
- **TIGHTER**: at least one risk number got safer and none got less safe.
|
|
32
|
+
- **NEUTRAL**: nothing that moves risk changed (a name, a description, a take-profit step).
|
|
33
|
+
- **LOOSER**: at least one risk number got less safe: a bigger size or exposure, a higher loss limit, a stop or a trail removed or widened, a safety gate removed, a screen clause dropped, more or costlier agent sessions, or a cheaper fill model.
|
|
34
|
+
|
|
35
|
+
The proposal shows up as a card on the `Q` screen under PROPOSALS FROM CHAT. `o` opens the newest one (the selected strategy's first) with every changed field, old and new, who proposed it and why:
|
|
36
|
+
|
|
37
|
+
- `y` applies a tighter or neutral proposal as a new version of the strategy. The change journal records the proposal's id, who proposed it, the change and the content hash before and after.
|
|
38
|
+
- A LOOSER proposal needs two keys: the first `y` opens the "less safe" popup that lists every field getting looser, and only a second `y` applies it. Any other key cancels.
|
|
39
|
+
- `n` dismisses the proposal; `esc` closes the card and keeps it for later.
|
|
40
|
+
|
|
41
|
+
Applying checks the proposal again from scratch: if the strategy changed since it was made, it is refused (dismiss it and ask again), and the tighter or looser verdict is worked out again rather than taken from the card.
|
|
42
|
+
|
|
43
|
+
**What the analyst can never change.** The mode (so it can never switch a strategy to live), the book, the daily session budget and the exit-liquidity floor are yours only: a proposal that touches them, directly or by replacing the section around them, is refused before it reaches you. It cannot apply a proposal or skip the second key either. A shipped preset is read-only, so the analyst proposes a copy under a new id instead, always on paper.
|
|
44
|
+
|
|
45
|
+
**A backtest next to it.** The analyst can backtest a proposal next to the current version on the same window of your recorded history (up to 14 days). A proposal's backtest saves nothing (a backtest of a strategy itself is recorded as its evidence for the journey (https://dexterm.xyz/docs/build-a-strategy-by-chat)), runs one at a time and is rate-limited, and it carries the limits above (https://dexterm.xyz/docs/autotrade#backtests-and-their-limits): read the number of trades before the totals.
|
|
46
|
+
|
|
47
|
+
An agent you connect over MCP (`dexterm mcp`) gets the same seven tools under the same rules: `strategy_list`, `strategy_get`, `strategy_validate`, `strategy_propose_edit`, `strategy_propose_new`, `strategy_backtest` and `autotrade_status`. An AI scan (https://dexterm.xyz/docs/scan) session cannot propose at all.
|
|
48
|
+
|
|
49
|
+
**From a chat to an always-on strategy.** Building a whole strategy by chat, backtesting it with the held-out split, forward-testing it on live data on paper and promoting it one rung at a time (always-on, then real, each applied only by you) has its own page: build a strategy by chat (https://dexterm.xyz/docs/build-a-strategy-by-chat).
|
|
50
|
+
|
|
51
|
+
Paper only. Not financial advice.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-checking-the-record-of-a-run
|
|
3
|
+
title: Autotrade (paper) › Stopping it › Checking the record of a run
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Checking the record of a run
|
|
8
|
+
anchor: checking-the-record-of-a-run
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#checking-the-record-of-a-run
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- checking
|
|
14
|
+
- record
|
|
15
|
+
- run
|
|
16
|
+
- stopping
|
|
17
|
+
- paper
|
|
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/autotrade.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
`dexterm autotrade audit` lists your runs. `dexterm autotrade audit --verify` (all runs, `--last`, or one run id) recomputes each run file's hash chain and checks it against the run's summary, so an edited, missing, reordered or cut-off line is named by its event number. It exits with code 1 when a run does not verify.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-comparing-them
|
|
3
|
+
title: Autotrade (paper) › Several strategies at once › Comparing them
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Comparing them
|
|
8
|
+
anchor: comparing-them
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#comparing-them
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- comparing
|
|
14
|
+
- them
|
|
15
|
+
- several
|
|
16
|
+
- strategies
|
|
17
|
+
- once
|
|
18
|
+
- paper
|
|
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/autotrade.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
`dexterm autotrade status --all` (and the Q screen's runner view while a parallel run works) shows one row per strategy:
|
|
30
|
+
|
|
31
|
+
| Column | What it counts |
|
|
32
|
+
|---|---|
|
|
33
|
+
| ACCOUNT | the paper account it trades from (shown when any strategy uses one) |
|
|
34
|
+
| P/L, P/L % | the strategy's paper book against its own bankroll; on a paper account, its own trades against the account's balance |
|
|
35
|
+
| WIN, CLOSED | the share of closed trades that made money, next to how many closed |
|
|
36
|
+
| OPEN | positions it holds now |
|
|
37
|
+
| RUGS, RUG EXP | exits caused by a rug or a liquidity pull, and the share of the money it put in that went into those coins |
|
|
38
|
+
| MISSED | coins it saw as candidates, did not enter, that later traded at 2x or more of the price it saw |
|
|
39
|
+
| SPEND, $/ENTRY | its model spend, and that spend per entry |
|
|
40
|
+
|
|
41
|
+
Below the table: one row per paper account (start, equity, cash, P/L, open positions and the strategies on it), the strategies together with each account counted once, and the shared limits in use today. `--json` gives the same numbers for a script. Read the closed-trade counts before the percentages: a few hours of paper trading is not evidence that one strategy is better.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-exits-and-wakes
|
|
3
|
+
title: Autotrade (paper) › Exits and wakes
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Exits and wakes
|
|
8
|
+
anchor: exits-and-wakes
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#exits-and-wakes
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- exits
|
|
14
|
+
- wakes
|
|
15
|
+
- paper
|
|
16
|
+
confidence: high
|
|
17
|
+
owner: maintainers
|
|
18
|
+
origin: docs-generated
|
|
19
|
+
reviewed_by: generated@2026-10-16
|
|
20
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
21
|
+
sources:
|
|
22
|
+
- site/content/docs/autotrade.md
|
|
23
|
+
date: 2026-10-16
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
Exits never wait for your agent. On every tick of a coin you hold, a position monitor runs your exit profile's mechanical rules at once, in this order, and a full exit ends that tick:
|
|
27
|
+
|
|
28
|
+
1. **Rug or liquidity pull**: the pool is under the strategy's `execution.minExitLiquidityUsd`. A bag that cannot be sold is marked stuck and tried again on every tick.
|
|
29
|
+
2. **Thesis breaks**: liquidity down by the profile's percent from its recent high, a market-cap source split (the two sources count supplies more than 5× apart; a price move alone never counts, even when one source's figure is minutes old), or dead volume. (The dev-sell exit needs on-chain sell events, which are not recorded yet, so it does not fire.)
|
|
30
|
+
3. **Maximum hold** (`maxHoldMinutes`): the position's own dead-man.
|
|
31
|
+
4. **Hard stop**, when the profile has one.
|
|
32
|
+
5. **Cost recovery** (moonbag): once, at the profile's gain (+100% in moonbag), sell the slice whose proceeds pay back what the position cost, at most `maxSellFrac` of the bag (60% in moonbag). What is left is a free bag.
|
|
33
|
+
6. **The take-profit ladder**: several steps can fill on one jump.
|
|
34
|
+
7. **The bag trail** (moonbag): only after the cost came back, measured from the peak since entry (55% in moonbag).
|
|
35
|
+
8. **The trailing stop.**
|
|
36
|
+
9. **The time stop**, when its action is `exit`.
|
|
37
|
+
10. **Scale-in tranches** (`sizing.ladder`), each re-capped by your strategy.
|
|
38
|
+
|
|
39
|
+
**Wakes.** Only after those rules ran does the position's session hear anything, and everything from one tick goes out as one message:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
EVENT tp_filled: TP1 filled at +62.0%; 67% of the original size left
|
|
43
|
+
position p1: profile swing, cost $20.00, +62.0% on the mid price, TP filled 1, 67% of the size left, liq $100K
|
|
44
|
+
Reply with one of: hold, exit, tighten, reprofile.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
| event | when | your agent may answer | no answer, or no session |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| `tp_filled` | a take-profit step filled (when the profile asks for it) | hold, exit, tighten, reprofile | hold |
|
|
50
|
+
| `cost_recovered` | the cost-recovery sell filled (moonbag) | hold, exit, tighten | hold |
|
|
51
|
+
| `time_review` / `time_tighten` | the profile's clock ran out below its target | hold, exit, tighten | the profile's `wake.noAnswer` (swing: exit, runner: hold) |
|
|
52
|
+
| `drawdown` | the position fell to the profile's `wake.drawdownPct` | hold, exit, tighten | hold |
|
|
53
|
+
| `thesis_warning` | liquidity fell part of the way to a thesis exit | hold, exit, tighten | hold |
|
|
54
|
+
| `mechanical_exit` | after any mechanical exit (for information) | hold | — |
|
|
55
|
+
| `stuck` | a sell could not execute | hold | tried again every tick |
|
|
56
|
+
|
|
57
|
+
**What an answer can do.** Your agent can only lower the risk:
|
|
58
|
+
|
|
59
|
+
- `exit` sells everything, and `exit` with a `fraction` trims.
|
|
60
|
+
- `tighten` arms the trailing stop now; on a free bag it halves the bag trail (never below 10%), and nothing can loosen it again.
|
|
61
|
+
- `reprofile` moves only along the profile's `reprofileTo` edges, and a move to a profile that allows a bigger size needs the first take-profit filled.
|
|
62
|
+
- It can never add size: an `enter` or a size on a held coin is refused and written down.
|
|
63
|
+
- It can never stop or delay a mechanical exit: the next tick's rules run whether a reply is pending or not. A reply that lands after its position closed, or after `agent.decideWithinSec`, is written down and never executed.
|
|
64
|
+
|
|
65
|
+
**On the paper desk.** When the monitor runs as its own process, its orders go through the same paper desk (https://dexterm.xyz/docs/agents#agent-paper-trading) that agents use, so every fence there applies around your strategy's own clamp:
|
|
66
|
+
|
|
67
|
+
- A paper-only mandate you armed yourself with a keypress (`dexterm mandate draft --paper`). Its caps apply at the agent tier (a quarter of the per-trade cap), and an entry is refused without one.
|
|
68
|
+
- Each entry registers an exit plan with the desk, and each monitor sell is journaled as `agent.paper.exit.<rule>` (for example `agent.paper.exit.cost-recovery` or `agent.paper.exit.bag-trail`). Every fill carries a short note naming the run, the position, the profile and the exit rule.
|
|
69
|
+
- A cost-recovery slice is sized on at most three Jupiter quotes (one for the largest allowed slice, one to confirm the estimate, at most one correction); without a quote it waits for the next tick instead of guessing.
|
|
70
|
+
- A `close-only` control state lets exits run while every new buy is refused, also after the mandate has expired. `dexterm wallet panic` stops everything, exits included.
|
|
71
|
+
|
|
72
|
+
**Restarts and the dead-man.** The monitor rebuilds its positions from the paper journal and the run files. An exit that was journaled but had not filled when it stopped is never sent again; the next tick decides afresh. Paper positions it did not open are left alone. It writes `~/.dexterm/autotrade/monitor-status.json` every 10 seconds, and entries are refused when that is more than 30 seconds old. It keeps exiting while the runner is down, but it adds no scale-in tranche then.
|
|
73
|
+
|
|
74
|
+
**Today's limits.** The monitor and the desk changes are in the app, but `dexterm autotrade run` does not use them yet. Until it does, these same rules run in the same order on the engine's own paper book, the one backtests use.
|
|
75
|
+
|
|
76
|
+
Paper only: the monitor refuses a strategy in live mode, and nothing in it can arm a mandate, sign, or touch a wallet or a key.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-how-a-stop-reaches-the-runner
|
|
3
|
+
title: Autotrade (paper) › Stopping it › How a stop reaches the runner
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: How a stop reaches the runner
|
|
8
|
+
anchor: how-a-stop-reaches-the-runner
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#how-a-stop-reaches-the-runner
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- stop
|
|
14
|
+
- reaches
|
|
15
|
+
- runner
|
|
16
|
+
- stopping
|
|
17
|
+
- paper
|
|
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/autotrade.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
- `stop` and `flatten` write a request for the running run to `~/.dexterm/autotrade/control.json`. The runner reads it on every step and shows the halt in its heartbeat file, and the command waits up to 10 seconds (`--wait SEC`) to tell you it did.
|
|
29
|
+
- A stop is final for that run: a flatten can follow it, nothing lifts it. To trade again, start a new run.
|
|
30
|
+
- A request for an older run never touches a new one, and a control file the runner cannot read counts as a stop.
|
|
31
|
+
- `flatten` asks for `y` on a real terminal; `--yes` answers for a script (a flatten only sells).
|
|
32
|
+
- The runner reads the panic file on every step, and `dexterm autotrade run` will not start while it is on.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-on-the-q-screen
|
|
3
|
+
title: Autotrade (paper) › Strategies and presets › On the Q screen
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: On the Q screen
|
|
8
|
+
anchor: on-the-q-screen
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#on-the-q-screen
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- screen
|
|
14
|
+
- strategies
|
|
15
|
+
- presets
|
|
16
|
+
- paper
|
|
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/autotrade.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
the strategy editor on sample data: a typo in the screen filter is caught at its column while you type
|
|
28
|
+
|
|
29
|
+
Press `Q` on any screen for AUTOTRADE, paper only. `tab` moves between its views:
|
|
30
|
+
|
|
31
|
+
- **Strategies**: the presets and your own files with mode, version, content hash and the last backtest (net, drawdown, trades). `n` copies the selected preset under a new id, `d` duplicates any strategy, `⏎` or `e` opens it in the editor, `x` writes it to a shareable file in `~/.dexterm/exports`, and `i` imports a file (always as paper). `o` opens the card of a change the analyst proposed in chat (how that works (https://dexterm.xyz/docs/autotrade#change-a-strategy-by-chat)).
|
|
32
|
+
- **Editor**: one form in six sections (entry, exits, risk, sizing, agent, execution). `⏎` changes the selected field (a true/false field flips in place). Every change re-validates the whole strategy and every problem shows next to its field with its path; the screen filter is checked by the screener's own parser while you type, and the column of a mistake is marked. Each exit profile gets a one-line sketch of its stop, take-profits, trails and limits. `s` saves only a valid strategy, as a new version with the change in the journal; `u` undoes your last unsaved change, or, with nothing unsaved, the last saved one (as a new version). The presets open read-only: copy one first.
|
|
33
|
+
- **Compare**: `c` on two strategies in the list shows them side by side with the fields that differ first, and `b` backtests both on the same window of recorded history.
|
|
34
|
+
- **Backtest**: `b` backtests the selected strategy on the last 14 days of your recorded history and shows the report: trades, win rate with its interval, net, drawdown, the tail numbers, an equity line, results by exit rule, profile and trigger, the size clamps that fired, the refused entries and the limits box. `w` runs a sweep around the default exit profile's own settings with the held-out check described below; its verdict is printed as is. Both run in the background, so the app stays live.
|
|
35
|
+
- **Runner**: a running paper runner's heartbeat, any halt, its candidates, sessions, positions and the last lines of its run file; a runner whose heartbeat is more than 30 seconds old shows as stale. `!` stops it, `p` pauses and resumes new entries, and `f` then `y` flattens it (see Stopping it (https://dexterm.xyz/docs/autotrade#stopping-it)).
|
|
36
|
+
- **Journey**: `J` on a strategy shows its ladder (draft, backtested, forward-tested, always-on, real) with the evidence for each rung, the forward test running or its report next to the backtest, and any promotion waiting for you. `b` backtests it with the held-out split, `F` starts a 24-hour paper forward test on live data and `X` stops it, `A` then `y` applies a pending always-on promotion. Real is never applied from a key (see build a strategy by chat (https://dexterm.xyz/docs/build-a-strategy-by-chat)).
|
|
37
|
+
|
|
38
|
+
Nothing on this screen can switch a strategy to live, arm a mandate or touch a wallet or a key: the mode is not an editable field, an import is always paper, and a strategy that says live is refused for backtests.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-one-strategy-or-all-of-them
|
|
3
|
+
title: Autotrade (paper) › Several strategies at once › One strategy, or all of them
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: One strategy, or all of them
|
|
8
|
+
anchor: one-strategy-or-all-of-them
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#one-strategy-or-all-of-them
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- strategy
|
|
14
|
+
- all
|
|
15
|
+
- them
|
|
16
|
+
- several
|
|
17
|
+
- strategies
|
|
18
|
+
- once
|
|
19
|
+
- paper
|
|
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/autotrade.md
|
|
27
|
+
date: 2026-10-16
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
- **All of them:** `dexterm autotrade stop`, `dexterm autotrade flatten`, `dexterm autotrade pause` and `resume`, the Q screen's `!`, `f` and `p`, `dexterm wallet panic`, and Ctrl+C.
|
|
31
|
+
- **One of them:** `dexterm autotrade stop --strategy ID` (no new entries, its sessions close, its exits run until it holds nothing; final for that run), `flatten --strategy ID`, `pause --strategy ID` and `resume --strategy ID`, and `dexterm autotrade start ID` for a listed strategy that is not running. The other strategies keep going.
|
|
32
|
+
|
|
33
|
+
An agent you connect over MCP can read the list and the comparison, accounts included (`autotrade_parallel_list`, `autotrade_parallel_compare`), and can start, stop or pause one strategy that you listed (`autotrade_parallel_start`, `autotrade_parallel_stop`). It cannot add a strategy or an account, move a strategy to another account, change a size or a cap, or start anything that is not on paper.
|
|
34
|
+
|
|
35
|
+
Paper only: `--live` and `"mode": "live"` are refused. dexterm holds no key; live trading happens in a Telegram trading bot of your choice (see Live trading (https://dexterm.xyz/docs/live-trading)). Simulated fills, not financial advice.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-paper-accounts
|
|
3
|
+
title: Autotrade (paper) › Several strategies at once › Paper accounts
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Paper accounts
|
|
8
|
+
anchor: paper-accounts
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#paper-accounts
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- paper
|
|
14
|
+
- accounts
|
|
15
|
+
- several
|
|
16
|
+
- strategies
|
|
17
|
+
- once
|
|
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/autotrade.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
A paper account is one simulated wallet that several strategies trade from together. List the accounts in `autotrade.json` and point a strategy at one with `account` instead of giving it a bankroll:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"schema": "dexterm-autotrade/1",
|
|
33
|
+
"accounts": [
|
|
34
|
+
{ "id": "main", "bankroll": { "usd": 1000 } },
|
|
35
|
+
{ "id": "yolo", "bankroll": { "sol": 1 } }
|
|
36
|
+
],
|
|
37
|
+
"strategies": [
|
|
38
|
+
{ "id": "moon", "preset": "moonbag", "account": "main" },
|
|
39
|
+
{ "id": "scalp", "preset": "scalp", "account": ["main", "yolo"] },
|
|
40
|
+
{ "id": "solo", "preset": "my-scalp", "bankroll": { "usd": 200 } }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- **Many strategies, one wallet.** `moon` and `scalp` both trade from `main`'s cash: a buy by one leaves less for the other, a sale pays back into the same account, and every size is a share of the whole account (cash plus what is held). An order is checked against the cash again at the fill, so two strategies can never spend the same dollars.
|
|
46
|
+
- **One strategy, many wallets.** A list of accounts runs the same strategy once per account, here as `scalp-main` and `scalp-yolo`. Each one is its own strategy in the run: its own run file, positions, loss limits, sessions and spend budget, and `dexterm autotrade stop --strategy scalp-yolo` stops only that one.
|
|
47
|
+
- **What stays per strategy:** its positions, its share of the money at risk (`maxExposurePct` counts its own positions against the account), its loss streak and cooldowns, its per-coin rules, its entries per day and its model budget. Its drawdown limit reads the account: when the account falls far enough, each strategy on it stops entering at its own limit.
|
|
48
|
+
- **Mixing is fine.** Strategies with their own `bankroll` run next to strategies on accounts. A strategy on an account takes no `bankroll` of its own, and an account it names must be in `accounts`; anything else stops the run before it starts, with the problem named.
|
|
49
|
+
|
|
50
|
+
Accounts live for the run: each starts at its `bankroll` when the run starts (a SOL balance at the SOL price, or `"solUsd"` / `--sol-usd` in a replay), and a strategy you `start` again later joins the same account. Up to 8 accounts. Paper only: an account is simulated cash and never backs a live strategy.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-presets
|
|
3
|
+
title: Autotrade (paper) › Strategies and presets › Presets
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Presets
|
|
8
|
+
anchor: presets
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#presets
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- presets
|
|
14
|
+
- strategies
|
|
15
|
+
- paper
|
|
16
|
+
confidence: high
|
|
17
|
+
owner: maintainers
|
|
18
|
+
origin: docs-generated
|
|
19
|
+
reviewed_by: generated@2026-10-16
|
|
20
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
21
|
+
sources:
|
|
22
|
+
- site/content/docs/autotrade.md
|
|
23
|
+
date: 2026-10-16
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
Six read-only presets ship with dexterm, each on paper (five with a $1,000 paper book, `yolo` with $200):
|
|
27
|
+
|
|
28
|
+
| preset | the idea |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `scalp` | young pairs (under 6 h) on a 5-minute push, small take-profits, a hard stop and a short time exit |
|
|
31
|
+
| `swing` | pairs from 1 hour to a week old on every screen match, wider take-profits and trail, a review after 90 minutes |
|
|
32
|
+
| `runner` | older pairs with deeper liquidity, sized by confidence, a wide trail and a long hold |
|
|
33
|
+
| `moonbag` | very young pairs (under 2 h) on an early push, with the holder-safety gates: take the cost back at about 2x, then hold a free bag with a loose trail |
|
|
34
|
+
| `sample-dip-ladder` | a shareable example of a custom strategy: risk-sized, buys half and adds half on a dip |
|
|
35
|
+
| `yolo` | **HIGH RISK**: one young pair at a time after the holder-safety gates and a live LARP check, the cost back at about 2x, then a free bag; paper only. See Full-port yolo strategy (https://dexterm.xyz/docs/yolo) |
|
|
36
|
+
|
|
37
|
+
**About moonbag:** most early entries lose. Young pairs rug often, and a rug cannot be sold: once liquidity is pulled, the bag is stuck and counts as zero. The preset therefore uses small tickets and no hard stop, and the point is the rare coin that runs. Read its backtest's tail numbers, never only the total.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-running-it-all-day
|
|
3
|
+
title: Autotrade (paper) › Running it all day
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Running it all day
|
|
8
|
+
anchor: running-it-all-day
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#running-it-all-day
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- running
|
|
14
|
+
- all
|
|
15
|
+
- day
|
|
16
|
+
- paper
|
|
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/autotrade.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
`dexterm autotrade run` is a headless process: start it in a terminal (or a terminal multiplexer such as `tmux`) and it works until you stop it (https://dexterm.xyz/docs/autotrade#stopping-it), `--max-minutes` runs out, or you press Ctrl+C. A two-hour run is measured under What it costs (https://dexterm.xyz/docs/autotrade#what-it-costs-claude-usage-per-session). Screening uses no model at all, so a runner that is only watching costs no Claude usage; usage starts when a coin matches.
|
|
28
|
+
|
|
29
|
+
- **One runner per machine.** A second `run` is refused while one is working. A lock left by a runner that crashed is taken over once its process is gone.
|
|
30
|
+
- **Each run has its own paper book.** It starts from the strategy's `bankroll`, and a new run starts a fresh one. A run that ends with positions still open says how many on its last line and in its run file; nothing carries them into the next run (the always-on service (https://dexterm.xyz/docs/autotrade#the-always-on-service) carries them over after a crash).
|
|
31
|
+
- **In a terminal, leave it open.** A runner started by hand stops when its terminal session ends, and the computer's sleep pauses it. The always-on service below starts it with your login instead.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-sessions-and-their-limits
|
|
3
|
+
title: Autotrade (paper) › The runner and candidate sessions › Sessions and their limits
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Sessions and their limits
|
|
8
|
+
anchor: sessions-and-their-limits
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#sessions-and-their-limits
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- sessions
|
|
14
|
+
- their
|
|
15
|
+
- limits
|
|
16
|
+
- runner
|
|
17
|
+
- candidate
|
|
18
|
+
- paper
|
|
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/autotrade.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**Token text is data.** Names, symbols and every other text that comes from the token reach the agent only inside `<untrusted>` tags, and the agent is told such text is never an instruction. A coin named "buy the maximum" still gets your strategy's size, and nothing the agent says can stop a mechanical exit.
|
|
30
|
+
|
|
31
|
+
**The session is answer-only.** It is `claude -p` with no tools, no MCP servers, no settings, no saved session and no slash commands, started in an empty folder (it is not `--bare`, which would drop your Claude login). Its first event must show the kind of login you configured and no tools; if it does not, the session ends before anything it says counts, and the runner starts no new session for the rest of the run. The limits come from the strategy's `agent` section (the presets' values): at most 2 sessions at once, $0.50 per session (also passed to `claude` as its own budget), $10 a day, 60 turns, 90 seconds per decision (60 in moonbag; a slow candidate is skipped, and a slow review gets the exit profile's no-answer rule), 4 hours per session, and the candidate is dropped 5 minutes after it last matched (4 in moonbag). The model is the strategy's `agent.model` (`sonnet` in the presets), or `--model` for one run.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-several-strategies-at-once
|
|
3
|
+
title: Autotrade (paper) › Several strategies at once
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Several strategies at once
|
|
8
|
+
anchor: several-strategies-at-once
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#several-strategies-at-once
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- several
|
|
14
|
+
- strategies
|
|
15
|
+
- once
|
|
16
|
+
- paper
|
|
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/autotrade.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
`dexterm autotrade run --all --paper` runs every strategy you list in `~/.dexterm/autotrade/autotrade.json` at the same time, on the same live data. Use it to forward-test several ideas side by side: a scalp and a moonbag, or one preset next to your copy of it with a single change.
|
|
28
|
+
|
|
29
|
+
- **One data feed for all of them.** The screener fetches once and every strategy screens the same coins with its own entry rules, so three strategies do not cost three times the data requests. A coin's dossier is fetched once (at most every 30 seconds), whichever strategy asks for it.
|
|
30
|
+
- **Each strategy has its own book.** It gets its own bankroll, run id and run file (`~/.dexterm/autotrade/runs/<run>.jsonl`, hash-chained), loss limits and breaker, candidate sessions and model spend budget. A breaker or a stop on one strategy never stops another. Or let several strategies trade from one paper account (https://dexterm.xyz/docs/autotrade#paper-accounts), the way several bots would share one wallet.
|
|
31
|
+
- **Shared limits for all of them.** Model sessions open at once, model spend per day, sessions per day, turns per day, the usage guard of your Claude account and one check of how busy your computer is all count across every strategy. When one of them is reached, every strategy waits.
|
|
32
|
+
|
|
33
|
+
It is still one runner on your machine: a second `run` (one strategy or `--all`) is refused while it works.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-stopping-it
|
|
3
|
+
title: Autotrade (paper) › Stopping it
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Stopping it
|
|
8
|
+
anchor: stopping-it
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#stopping-it
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- stopping
|
|
14
|
+
- paper
|
|
15
|
+
confidence: high
|
|
16
|
+
owner: maintainers
|
|
17
|
+
origin: docs-generated
|
|
18
|
+
reviewed_by: generated@2026-10-16
|
|
19
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
20
|
+
sources:
|
|
21
|
+
- site/content/docs/autotrade.md
|
|
22
|
+
date: 2026-10-16
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Three switches, from soft to hard. You use them; your agent cannot. A session has no tools, and its answer has no stop, resume or flatten in it.
|
|
26
|
+
|
|
27
|
+
| switch | what stops | what keeps running | after it |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `dexterm autotrade stop`, or `!` on the `Q` screen | new entries; every session closes; orders not yet filled are dropped | the mechanical exits on what you hold | the runner ends once nothing is held |
|
|
30
|
+
| `dexterm autotrade flatten`, or `f` then `y` on the `Q` screen | the same, then every paper position sells at its next tick | a coin that cannot sell (a pulled pool) is retried every tick | the runner ends once nothing is held |
|
|
31
|
+
| `dexterm wallet panic` | the runner halts on its next step, as in a stop; every paper desk refuses too | the runner's mechanical exits | nothing starts again until `dexterm wallet resume`, a keypress on a real terminal |
|
|
32
|
+
|
|
33
|
+
`p` on the `Q` screen pauses new entries, and `p` again resumes them; open positions keep their exits either way.
|
|
34
|
+
|
|
35
|
+
Under the always-on service (https://dexterm.xyz/docs/autotrade#the-always-on-service), a stop or flatten from any of these (or `dexterm autotrade service stop`) also keeps the service stopped until `dexterm autotrade service start`; a pause does not stop it.
|
|
36
|
+
|
|
37
|
+
With several strategies at once (https://dexterm.xyz/docs/autotrade#several-strategies-at-once), these switches act on every strategy, and `--strategy ID` on `stop`, `flatten`, `pause` and `resume` acts on one. An agent you connect over MCP can stop or pause one strategy you listed there, never all of them and never the panic.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-strategies-and-presets
|
|
3
|
+
title: Autotrade (paper) › Strategies and presets
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: Strategies and presets
|
|
8
|
+
anchor: strategies-and-presets
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#strategies-and-presets
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- strategies
|
|
14
|
+
- presets
|
|
15
|
+
- paper
|
|
16
|
+
confidence: high
|
|
17
|
+
owner: maintainers
|
|
18
|
+
origin: docs-generated
|
|
19
|
+
reviewed_by: generated@2026-10-16
|
|
20
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
21
|
+
sources:
|
|
22
|
+
- site/content/docs/autotrade.md
|
|
23
|
+
date: 2026-10-16
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
A strategy is one JSON file (`dexterm-strategy/1`) with six parts:
|
|
27
|
+
|
|
28
|
+
- **Entry**: the screener filter grammar (https://dexterm.xyz/docs/screens), verbatim (for example `liq >= 30K vol1h > 15K !flag:mint !flag:freeze`), an age window, safety gates (no mint or freeze authority, top-10 share, dev share, a market-cap source split, a "young and already vertical" reject, and what to do when the holder source is down) and triggers (every screen match, or a 5-minute momentum push).
|
|
29
|
+
- **Exits**: one or more exit profiles: a take-profit ladder, a trailing stop, a time stop, an optional hard stop, thesis breaks (a liquidity drop, a market-cap source split, dead volume), a maximum hold time and, for the moonbag profile, a cost-recovery sell and a trail on the free bag that is left.
|
|
30
|
+
- **Sizing**: a fixed amount, a percent of the book, risk-sized against the stop, or scaled by the agent's confidence inside your bounds, with optional scale-in tranches. Every size is capped by a maximum percent and a maximum dollar amount.
|
|
31
|
+
- **Risk**: a per-trade loss cap, a daily loss halt, drawdown size-down and halt levels, the most positions open at once, total exposure, entries per day, a loss-streak cooldown and per-coin re-entry rules.
|
|
32
|
+
- **Agent** and **execution**: the session limits for the runner (https://dexterm.xyz/docs/autotrade#the-runner-and-candidate-sessions) and the fill model's fee, slippage, network fee, price-impact cap and the liquidity below which a bag cannot be sold.
|
|
33
|
+
|
|
34
|
+
The file is closed: an unknown key is refused with its path, so a strategy cannot carry a `signer`, `wallet` or `key` section. Validation also checks the rules a schema cannot (a take-profit ladder that climbs, sell fractions that add up to at most the whole position, sizing parameters that match the sizing mode, drawdown levels in order) and prints every problem with its path. Every strategy gets a content hash, so a backtest line always names the exact rules it ran.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-the-always-on-service
|
|
3
|
+
title: Autotrade (paper) › Running it all day › The always-on service
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: The always-on service
|
|
8
|
+
anchor: the-always-on-service
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#the-always-on-service
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- always-on
|
|
14
|
+
- service
|
|
15
|
+
- running
|
|
16
|
+
- all
|
|
17
|
+
- day
|
|
18
|
+
- paper
|
|
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/autotrade.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Install it once and the strategies in your `autotrade.json` (https://dexterm.xyz/docs/autotrade#the-autotradejson-file) keep running: they start when you log in, start again after a crash, never run twice, stop at once on any kill switch, and tell you when they cannot run.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
dexterm autotrade service install --dry-run # shows exactly what it would write; writes nothing
|
|
33
|
+
dexterm autotrade service install --load # writes it and loads it
|
|
34
|
+
dexterm autotrade service status # running?, guard, crashes, each strategy
|
|
35
|
+
dexterm autotrade service stop # no new entries now; exits keep running; stays stopped
|
|
36
|
+
dexterm autotrade service start # start again (lifts a stop)
|
|
37
|
+
dexterm autotrade service logs # the end of its log
|
|
38
|
+
dexterm autotrade service uninstall # stop, unload, remove exactly what install wrote
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- **What install writes.** One small job that runs `dexterm autotrade service ensure` every minute and at login: a LaunchAgent in `~/Library/LaunchAgents/` on macOS (no `KeepAlive`), a systemd user timer in `~/.config/systemd/user/` on Linux, a scheduled task on Windows. Install prints every file in full and checks that it parses before writing anything; `--dry-run` stops there, and without `--load` nothing is loaded. It runs while you are logged in (on Linux, `loginctl enable-linger` is your choice for after logout). Each `DEXTERM_HOME` gets its own job, so a test home never replaces your real one.
|
|
42
|
+
- **What a tick does.** `ensure` does nothing while the service's heartbeat is fresh, and otherwise starts it. The service runs `dexterm autotrade run --all --paper` for every strategy you listed, with the same lock, run files, `Q` screen and switches as a run you start by hand. Flags for it go in `~/.dexterm/autotrade/service.json` (`{ "schema": "dexterm-autotrade-service-config/1", "runArgs": ["--model", "sonnet"] }`; only `--model`, `--sol-usd`, `--config`, `--replay`, `--ms-per-tick`, `--max-minutes` and `--stub`).
|
|
43
|
+
- **After a crash or a restart.** A crash costs at most a minute. The new run checks the crashed run's file, takes over the paper positions it left open (their stops, take-profits, trails and maximum hold keep running from the original entry), and never buys a coin the crashed run already took. An order that had not filled never happened, and it is never sent again.
|
|
44
|
+
- **A crash loop gives up.** Restarts after a crash wait 0, 0, 1, 2 and 4 minutes; the sixth crash within an hour leaves the service down with one notification. `dexterm autotrade service status --clear` lets it start again once you have read the log.
|
|
45
|
+
- **A stop stays a stop.** `service stop`, `dexterm autotrade stop`, `!` on the `Q` screen, `/kill` from your Telegram bot, `dexterm wallet panic`, or simply creating the file `~/.dexterm/autotrade/service/STOP`: new entries halt on the next step, open positions keep their exits until they close (`service stop --flatten --yes` sells them), and the service stays stopped until `dexterm autotrade service start`. Logging out or shutting down is not a stop: it starts again at your next login.
|
|
46
|
+
- **The guard.** Every 10 seconds the service checks the machine and the data. These pause new entries until they clear, and never the exits on what you hold:
|
|
47
|
+
|
|
48
|
+
| guard | when |
|
|
49
|
+
|---|---|
|
|
50
|
+
| disk low | free space under `runner.json` `disk.minFreeGb` (5 GB by default); it lifts 1 GB above that |
|
|
51
|
+
| load high | the 1-minute load above `load.pauseAboveLoad1m` for `load.sustainSec`; it lifts below `load.resumeBelowLoad1m` |
|
|
52
|
+
| busy process | a `load.busyProcs` pattern is running (a render, a test suite) |
|
|
53
|
+
| stale data | no strategy has seen a market tick for 5 minutes |
|
|
54
|
+
|
|
55
|
+
It also tells you, without pausing anything, when the usage guard or a day cap holds new sessions back, when a strategy halts itself on its loss limits, when the strategies' heartbeat goes quiet, and when your market history has stopped growing (`dexterm record install` sets that up; the service trades without it, your backtests need it).
|
|
56
|
+
- **Your bot.** When your Telegram bot (https://dexterm.xyz/docs/telegram) is set up, the service runs it: every strategy's alerts, `/status`, `/pause` and `/kill`, plus a message when the service is down, gives up after a crash loop, a guard trips, a strategy halts on its caps, or the data goes stale.
|
|
57
|
+
- **Light on the machine.** It runs at low priority (nice 10, low IO priority), with a 512 MB memory cap (a leak ends in a restart, not a slow machine), and its logs in `~/.dexterm/autotrade/logs/` are capped at a few MB each.
|