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]
SubcommandWhat 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-runStrictly validate a repair plan and show the safe CLI commands that would run.
apply --plan PATH --yesExecute 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:

SignalMeaning
data_warnings, data_failuresCounts from marketdeck data doctor.
missing_blobs, orphaned_blobsMissing and orphaned analysis/backtest blob references.
kill_switch_required, risk_findingsRisk v2 kill-switch state and findings.
open_orders, open_positions, order_position_gapOperator 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.