eth-focused-portfolio-live-readiness.json 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. {
  2. "checklist": [
  3. {
  4. "category": "must",
  5. "evidence": [
  6. "Current place_order chooses ordType market when entry_price is absent and limit when entry_price is present.",
  7. "The only trade submit endpoint in code is /api/v5/trade/order."
  8. ],
  9. "gap": "No code path emits ordType=post_only or deterministic client order ids for ETH portfolio entries.",
  10. "key": "post_only",
  11. "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.",
  12. "status": "missing",
  13. "title": "OKX post-only entry support"
  14. },
  15. {
  16. "category": "must",
  17. "evidence": [
  18. "Current OKX client has one single-order place_order method.",
  19. "No /api/v5/trade/batch-orders endpoint or multi-order method is present."
  20. ],
  21. "gap": "The conservative portfolio can require multiple leg/order intents; the client cannot express an atomic or coordinated batch.",
  22. "key": "batch_orders",
  23. "minimum_task": "Define the portfolio order-intent shape for all active legs and add a non-submitting batch payload renderer.",
  24. "status": "missing",
  25. "title": "Batch entry order support"
  26. },
  27. {
  28. "category": "must",
  29. "evidence": [
  30. "No cancel_order, cancel_batch_orders, or orders-pending method exists in okx_client.py.",
  31. "The signal-intent report always sets needs_cancel to False and no_cancel_submission to True."
  32. ],
  33. "gap": "A quasi-live loop cannot expire stale maker orders or clear outstanding leg orders.",
  34. "key": "cancel_open_orders",
  35. "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.",
  36. "status": "missing",
  37. "title": "Cancel open orders"
  38. },
  39. {
  40. "category": "must",
  41. "evidence": [
  42. "paper_engine.py persists paper_state.json.",
  43. "Existing paper state assumes immediate local fills and has no exchange order lifecycle."
  44. ],
  45. "gap": "There is no dedicated ETH portfolio state containing signal clock, order ids, fills, exposure, and audit events.",
  46. "key": "state_persistence",
  47. "minimum_task": "Add a dedicated ETH portfolio state schema and read/write command for quasi-live intent tracking.",
  48. "status": "partial",
  49. "title": "State persistence"
  50. },
  51. {
  52. "category": "must",
  53. "evidence": [
  54. "place_order calls ensure_hedge_mode before submitting.",
  55. "set_leverage sends mgnMode=isolated and place_order sends tdMode=isolated with posSide."
  56. ],
  57. "gap": "Isolation exists only inside the single-order submitter; portfolio readiness still needs the same fields in generated leg/order intents and close intents.",
  58. "key": "position_isolation",
  59. "minimum_task": "Require tdMode=isolated, posSide=long, and bounded leverage in every generated ETH portfolio intent.",
  60. "status": "partial",
  61. "title": "Position isolation"
  62. },
  63. {
  64. "category": "must",
  65. "evidence": [
  66. "okx-account reads positions.",
  67. "okx-order does not check existing ETH exposure before calling place_order."
  68. ],
  69. "gap": "A future runner could merge with or alter pre-existing ETH-USDT-SWAP exposure in the same account.",
  70. "key": "existing_position_protection",
  71. "minimum_task": "Before any submit-capable command, require zero conflicting ETH-USDT-SWAP exposure or an explicitly dedicated state-owned position id.",
  72. "status": "missing",
  73. "title": "Existing position protection"
  74. },
  75. {
  76. "category": "must",
  77. "evidence": [
  78. "build_eth_focused_portfolio_signal_intent.py evaluates cached candles once and writes dry-run output.",
  79. "No scheduler, last-confirmed-candle state, or one-cycle-per-candle guard exists in CLI code."
  80. ],
  81. "gap": "The repo cannot run a quasi-live candle-bound signal loop for the ETH-focused portfolio.",
  82. "key": "signal_scheduling",
  83. "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.",
  84. "status": "missing",
  85. "title": "Signal scheduling"
  86. },
  87. {
  88. "category": "must",
  89. "evidence": [
  90. "No logging module usage is present in okx_codex_trader.",
  91. "Existing reports are generated snapshots, not append-only runtime logs."
  92. ],
  93. "gap": "There is no durable audit trail for signal decisions, payloads, cancel intents, fills, or state transitions.",
  94. "key": "logs",
  95. "minimum_task": "Add append-only JSONL event logging for read-only signal/order/cancel intent cycles.",
  96. "status": "missing",
  97. "title": "Operational logs"
  98. }
  99. ],
  100. "created_at": "2026-04-29T18:28:25Z",
  101. "current_code_facts": {
  102. "batch_endpoint_in_client_code": false,
  103. "cancel_endpoint_in_client_code": false,
  104. "cli_has_okx_order_command": true,
  105. "live_plan_mentions_required_lifecycle": true,
  106. "paper_state_present": true,
  107. "portfolio_intent_is_readonly": true,
  108. "post_only_in_client_code": false,
  109. "single_order_submitter_present": true
  110. },
  111. "minimum_implementation_tasks": {
  112. "must": [
  113. "Add a read-only order-intent builder that renders the exact post_only order payloads for each required entry level without submitting them.",
  114. "Define the portfolio order-intent shape for all active legs and add a non-submitting batch payload renderer.",
  115. "Add read-only cancel-intent generation from tracked open order ids, then add client cancel/list methods before any live runner is enabled.",
  116. "Add a dedicated ETH portfolio state schema and read/write command for quasi-live intent tracking.",
  117. "Require tdMode=isolated, posSide=long, and bounded leverage in every generated ETH portfolio intent.",
  118. "Before any submit-capable command, require zero conflicting ETH-USDT-SWAP exposure or an explicitly dedicated state-owned position id.",
  119. "Add a read-only quasi-live runner that records last confirmed candle per leg and emits intent only when a leg clock advances.",
  120. "Add append-only JSONL event logging for read-only signal/order/cancel intent cycles."
  121. ],
  122. "optional": [
  123. "Add a demo-only execution adapter after read-only intent/state/logging proves one full signal cycle.",
  124. "Add reduce-only close-intent rendering and tests before adding any close submit path.",
  125. "Add portfolio-level exposure reports comparing intended weight, tracked exchange exposure, and cash limits."
  126. ]
  127. },
  128. "readiness": {
  129. "can_submit_orders_now": true,
  130. "ready_for_quasi_live": false,
  131. "reason": "Required order lifecycle, state ownership, scheduling, and audit pieces are missing or only partial.",
  132. "should_submit_orders_now": false
  133. },
  134. "report": "eth-focused-portfolio-live-readiness",
  135. "scope": "read-only static repository inspection; no OKX request, no order, no cancel",
  136. "source_files": {
  137. "cli": "okx_codex_trader/cli.py",
  138. "live_plan": "reports/eth-exploration/eth-robust-twap-live-plan.md",
  139. "okx_client": "okx_codex_trader/okx_client.py",
  140. "paper_engine": "okx_codex_trader/paper_engine.py",
  141. "portfolio_report": "reports/eth-exploration/eth-focused-portfolio-conservative-report.md",
  142. "signal_intent": "scripts/build_eth_focused_portfolio_signal_intent.py"
  143. }
  144. }