{ "checklist": [ { "category": "must", "evidence": [ "Current place_order chooses ordType market when entry_price is absent and limit when entry_price is present.", "The only trade submit endpoint in code is /api/v5/trade/order." ], "gap": "No code path emits ordType=post_only or deterministic client order ids for ETH portfolio entries.", "key": "post_only", "minimum_task": "Add a read-only order-intent builder that renders the exact post_only order payloads for each required entry level without submitting them.", "status": "missing", "title": "OKX post-only entry support" }, { "category": "must", "evidence": [ "Current OKX client has one single-order place_order method.", "No /api/v5/trade/batch-orders endpoint or multi-order method is present." ], "gap": "The conservative portfolio can require multiple leg/order intents; the client cannot express an atomic or coordinated batch.", "key": "batch_orders", "minimum_task": "Define the portfolio order-intent shape for all active legs and add a non-submitting batch payload renderer.", "status": "missing", "title": "Batch entry order support" }, { "category": "must", "evidence": [ "No cancel_order, cancel_batch_orders, or orders-pending method exists in okx_client.py.", "The signal-intent report always sets needs_cancel to False and no_cancel_submission to True." ], "gap": "A quasi-live loop cannot expire stale maker orders or clear outstanding leg orders.", "key": "cancel_open_orders", "minimum_task": "Add read-only cancel-intent generation from tracked open order ids, then add client cancel/list methods before any live runner is enabled.", "status": "missing", "title": "Cancel open orders" }, { "category": "must", "evidence": [ "paper_engine.py persists paper_state.json.", "Existing paper state assumes immediate local fills and has no exchange order lifecycle." ], "gap": "There is no dedicated ETH portfolio state containing signal clock, order ids, fills, exposure, and audit events.", "key": "state_persistence", "minimum_task": "Add a dedicated ETH portfolio state schema and read/write command for quasi-live intent tracking.", "status": "partial", "title": "State persistence" }, { "category": "must", "evidence": [ "place_order calls ensure_hedge_mode before submitting.", "set_leverage sends mgnMode=isolated and place_order sends tdMode=isolated with posSide." ], "gap": "Isolation exists only inside the single-order submitter; portfolio readiness still needs the same fields in generated leg/order intents and close intents.", "key": "position_isolation", "minimum_task": "Require tdMode=isolated, posSide=long, and bounded leverage in every generated ETH portfolio intent.", "status": "partial", "title": "Position isolation" }, { "category": "must", "evidence": [ "okx-account reads positions.", "okx-order does not check existing ETH exposure before calling place_order." ], "gap": "A future runner could merge with or alter pre-existing ETH-USDT-SWAP exposure in the same account.", "key": "existing_position_protection", "minimum_task": "Before any submit-capable command, require zero conflicting ETH-USDT-SWAP exposure or an explicitly dedicated state-owned position id.", "status": "missing", "title": "Existing position protection" }, { "category": "must", "evidence": [ "build_eth_focused_portfolio_signal_intent.py evaluates cached candles once and writes dry-run output.", "No scheduler, last-confirmed-candle state, or one-cycle-per-candle guard exists in CLI code." ], "gap": "The repo cannot run a quasi-live candle-bound signal loop for the ETH-focused portfolio.", "key": "signal_scheduling", "minimum_task": "Add a read-only quasi-live runner that records last confirmed candle per leg and emits intent only when a leg clock advances.", "status": "missing", "title": "Signal scheduling" }, { "category": "must", "evidence": [ "No logging module usage is present in okx_codex_trader.", "Existing reports are generated snapshots, not append-only runtime logs." ], "gap": "There is no durable audit trail for signal decisions, payloads, cancel intents, fills, or state transitions.", "key": "logs", "minimum_task": "Add append-only JSONL event logging for read-only signal/order/cancel intent cycles.", "status": "missing", "title": "Operational logs" } ], "created_at": "2026-04-29T18:28:25Z", "current_code_facts": { "batch_endpoint_in_client_code": false, "cancel_endpoint_in_client_code": false, "cli_has_okx_order_command": true, "live_plan_mentions_required_lifecycle": true, "paper_state_present": true, "portfolio_intent_is_readonly": true, "post_only_in_client_code": false, "single_order_submitter_present": true }, "minimum_implementation_tasks": { "must": [ "Add a read-only order-intent builder that renders the exact post_only order payloads for each required entry level without submitting them.", "Define the portfolio order-intent shape for all active legs and add a non-submitting batch payload renderer.", "Add read-only cancel-intent generation from tracked open order ids, then add client cancel/list methods before any live runner is enabled.", "Add a dedicated ETH portfolio state schema and read/write command for quasi-live intent tracking.", "Require tdMode=isolated, posSide=long, and bounded leverage in every generated ETH portfolio intent.", "Before any submit-capable command, require zero conflicting ETH-USDT-SWAP exposure or an explicitly dedicated state-owned position id.", "Add a read-only quasi-live runner that records last confirmed candle per leg and emits intent only when a leg clock advances.", "Add append-only JSONL event logging for read-only signal/order/cancel intent cycles." ], "optional": [ "Add a demo-only execution adapter after read-only intent/state/logging proves one full signal cycle.", "Add reduce-only close-intent rendering and tests before adding any close submit path.", "Add portfolio-level exposure reports comparing intended weight, tracked exchange exposure, and cash limits." ] }, "readiness": { "can_submit_orders_now": true, "ready_for_quasi_live": false, "reason": "Required order lifecycle, state ownership, scheduling, and audit pieces are missing or only partial.", "should_submit_orders_now": false }, "report": "eth-focused-portfolio-live-readiness", "scope": "read-only static repository inspection; no OKX request, no order, no cancel", "source_files": { "cli": "okx_codex_trader/cli.py", "live_plan": "reports/eth-exploration/eth-robust-twap-live-plan.md", "okx_client": "okx_codex_trader/okx_client.py", "paper_engine": "okx_codex_trader/paper_engine.py", "portfolio_report": "reports/eth-exploration/eth-focused-portfolio-conservative-report.md", "signal_intent": "scripts/build_eth_focused_portfolio_signal_intent.py" } }