MarketDeck docs
safety
Real-trading preflight, intent audit, local limit summary, and safety audit checks.
marketdeck safety centralises checks that should pass before a real-wallet path or an auto-trading agent is trusted.
Usage#
marketdeck safety <preflight|intents|limits|audit> [flags]
| Subcommand | What it does |
|---|---|
preflight [--wallet W] [--agent A] | Check wallet records, keyring availability, secrets, and real-auto-trade warnings. |
preflight --wallet W --action ... | Trading Preflight v2 for a concrete planned trade: wallet, symbol, mark price, sizing, margin, open orders/positions, risk limits, and kill-switch gates. |
intents [--limit N] [--blocked-only] [--wallet W] [--coin C] | Show recent Trading Preflight decisions from the local JSONL audit log. |
limits [--wallet W] | Show local safety limit context and real opens today. |
audit [--days-back N] | Summarise safety-relevant real-wallet and auto-trade state. |
Examples#
marketdeck safety preflight --format json
marketdeck safety preflight --wallet main
marketdeck safety preflight --wallet Main --action market --coin BTC --direction long --size-coin 0.001 --max-gross-leverage 2
marketdeck safety preflight --wallet Main --action open --coin ETH --direction short --leverage 5 --margin-pct 10 --min-liq-distance-pct 15
marketdeck safety intents --blocked-only --limit 20
marketdeck safety limits
marketdeck safety audit --days-back 14
Trading Preflight v2 is still read-only. When --action is supplied it builds a plan, returns structured checks, and exits with code 3 when any blocking finding is present. Supported actions are open, limit, market, and close.
The same engine is also used by marketdeck wallets open, limit, market, and close before a signed submit, so this command previews the decision those write commands will enforce.
Every concrete Trading Preflight v2 decision is appended to a local JSONL audit log under the MarketDeck data directory. safety intents reads that log and can filter by wallet, coin, and blocked-only decisions. The log stores plan metadata and findings, never private keys or API secrets.
Risk gates are optional and use the same portfolio engine as marketdeck risk: --max-gross-leverage, --max-position-notional, --max-coin-exposure-pct, --max-positions, --min-liq-distance-pct, --scenario, --default-shock-pct, and --min-equity-usd.
marketdeck risk preflight is portfolio-limit focused: it checks the current account against supplied risk limits. marketdeck safety preflight --action ... is trade focused: it checks whether a specific planned order is currently safe to send.
The command is read-only. It does not place, cancel, or modify any orders.