Codex
e6988324ca
PINK Phase 3 (G4): stream wiring + recovery + reconcile gate
pink_direct.py:
- connect(): set_seed_capital + REST account snapshot for crash recovery
- _run_account_stream(): BingxUserStream -> kernel.on_account_event()
FILL_SETTLED folds K; ACCOUNT_UPDATE stores E-facts + runs reconcile;
reconcile ERROR -> _enter_frozen=True (ENTERs blocked, exits always free)
FUNDING_FEE folds K-funding_net
- _unsafe_entry_reason(): checks _enter_frozen first
- step(): capital from available_capital (E rules when present, K fallback)
- _venue_http_client() / _venue_ws_url() helpers
test_account_reconcile_faults.py (Gate G4):
fee/funding/rounding -> WARN; unexplained -> ERROR
crash-recovery sequence; exit-never-frozen invariant
109/109 total offline tests pass.
2026-06-01 21:41:30 +02:00
..
2026-06-01 21:22:01 +02:00
2026-06-01 20:11:03 +02:00
2026-06-01 20:33:44 +02:00
2026-06-01 20:11:03 +02:00
2026-06-01 20:33:44 +02:00
2026-06-01 20:33:44 +02:00
2026-06-01 21:22:01 +02:00
2026-06-01 20:11:03 +02:00
2026-06-01 21:41:30 +02:00
2026-06-01 20:33:44 +02:00
2026-06-01 20:33:44 +02:00