MarketDeck docs
reports
Generate JSON or Markdown portfolio, risk, alert, and operations reports.
marketdeck reports builds read-only operator reports by composing existing CLI commands. The JSON output is intended for automation and plugins; Markdown is meant for human review.
Usage#
marketdeck reports <daily|weekly|portfolio|ops|export|schedule> [flags]
| Subcommand | What it does | |||
|---|---|---|---|---|
| `daily [--out PATH] [--report-format json | markdown]` | Portfolio, Risk v2, executions, alerts, reconcile, and ops for the last day. | ||
| `weekly [--out PATH] [--report-format json | markdown]` | Same bundle over a seven-day review window. | ||
| `portfolio [--out PATH] [--report-format json | markdown]` | Portfolio plus Risk v2 sections without ops noise. | ||
| `ops [--out PATH] [--report-format json | markdown]` | Daemon, plugins, jobs, Data Ops health, Reconcile v2 consistency, and alert status. | ||
| `export --file PATH [--report-format json | markdown] [--out PATH]` | Re-render a saved report. | ||
| `schedule [--kind daily | weekly | ops | portfolio]` | Print command, cron, and systemd timer snippets. |
Risk And Alerts#
Daily, weekly, and portfolio reports include Risk v2 sections:
| Section | Source command |
|---|---|
risk_v2.liquidation | marketdeck risk liquidation --min-distance-pct 10 |
risk_v2.margin | marketdeck risk margin |
risk_v2.scenarios | marketdeck risk scenarios --default-shock-pct=-10 |
risk_v2.drawdown | marketdeck risk drawdown with the report range where applicable. |
risk_v2.kill_switch | marketdeck risk kill-switch with liquidation, scenario, and equity gates. |
Daily, weekly, and ops reports include Alert v2 status:
| Section | Source command |
|---|---|
alerts.check | Trigger state for enabled rules. |
alerts.rules | Stored rules and enabled/disabled state. |
alerts.routes | Configured routing targets. |
alerts.history | Recent alert history for review. |
Ops reports also include Data Ops status:
| Section | Source command |
|---|---|
ops.data.status | DB/WAL/SHM sizes, cache inventory, config counts, and data coverage. |
ops.data.doctor | DB integrity, schema version, JSON state, cache, blob, and coverage checks. |
ops.data.repair_plan | Read-only repair/backfill/prune/vacuum recommendations. |
Reconcile sections use marketdeck reconcile summary as the central consistency status. Reports summarize Reconcile v2 data warnings, data failures, kill-switch status, and open orders versus positions instead of duplicating that logic. They also include repair action counts from Reconcile: total, executable, and blocked.
Examples#
marketdeck reports daily --report-format markdown
marketdeck reports weekly --out weekly.json --report-format json
marketdeck reports portfolio --report-format json
marketdeck reports ops --out ops.md
marketdeck reports export --file weekly.json --report-format markdown
marketdeck reports schedule --kind daily
Reports only read state. They do not route alerts, place orders, or mutate risk configuration.