MarketDeck docs
reconcile
Read-only exchange, local state, Data Ops, and Risk v2 reconciliation.
marketdeck reconcile is the central consistency surface for local state, exchange-facing state, Data Ops health, and Risk v2 kill-switch status. It composes existing CLI commands and stays read-only.
Usage#
marketdeck reconcile <summary|wallets|positions|orders|executions|repair-plan|apply> [flags]
| Subcommand | What it does |
|---|---|
summary [--wallet W] | Return Reconcile v2 status with findings, reports, and consistency signals. |
wallets [--wallet W] | Check wallet config shape and balance probes. |
positions [--wallet W] | Check local and remote position shape. |
orders [--wallet W] | Check open and resting order shape. |
executions [--wallet W] [--days-back N] | Check duplicate ids and missing fields across execution ledgers. |
repair-plan [--wallet W] [--out PATH] | Generate categorized read-only repair recommendations. |
apply --plan PATH --dry-run | Strictly validate a repair plan and show the safe CLI commands that would run. |
apply --plan PATH --yes | Execute only low-risk, read-only CLI repair steps and block review/risk/order actions. |
Reconcile V2 Signals#
summary includes a signals object used by monitor, reports, audit, WebUI, and GNOME:
| Signal | Meaning |
|---|---|
data_warnings, data_failures | Counts from marketdeck data doctor. |
missing_blobs, orphaned_blobs | Missing and orphaned analysis/backtest blob references. |
kill_switch_required, risk_findings | Risk v2 kill-switch state and findings. |
open_orders, open_positions, order_position_gap | Operator signal for open orders versus open positions. |
repair-plan emits actions categorized as data, orders, positions, executions, and risk. Each action includes command_args, command, executable, and executable_reason where MarketDeck can map the finding to a concrete next CLI step.
apply is a safety-gated executor. It rejects unknown categories, unknown actions, duplicate ids, unsupported plan versions, and any action that claims mutates_state: true.
With --dry-run, it returns planned actions and the exact marketdeck ... --format json commands that would be used. With --yes, it executes only low-risk, read-only actions such as strategies status, reports daily, reports weekly, reports ops, data backfill, data doctor, orders list, positions all, or executions reconcile. Risk, order-reduction, deduplication, blob-health, and metadata-repair actions remain blocked for manual review. Duplicate commands inside one plan are skipped after the first execution so a single root cause does not run the same check repeatedly.
Examples#
marketdeck reconcile summary --format json
marketdeck reconcile executions --days-back 90
marketdeck reconcile repair-plan --out reconcile-plan.json
marketdeck reconcile apply --plan reconcile-plan.json --dry-run
marketdeck reconcile apply --plan reconcile-plan.json --yes
For execution-only ledger checks, see marketdeck executions. For Data Ops repair recommendations, see marketdeck data.