Harden LIVE opens with slot claim and exchange reconcile.
Prevent duplicate opens by atomically claiming an opening slot, verifying exchange perp is flat before live orders, setting leverage from ledger, and preferring exchange position size when closing perps. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ def test_blocking_statuses_include_repair_states() -> None:
|
||||
assert "half_open" in BLOCKING_STATUSES
|
||||
assert "option_closed_perp_pending" in BLOCKING_STATUSES
|
||||
assert "open" in BLOCKING_STATUSES
|
||||
assert "opening" in BLOCKING_STATUSES
|
||||
|
||||
|
||||
def test_has_open_position_blocks_half_open(tmp_path, monkeypatch) -> None:
|
||||
|
||||
Reference in New Issue
Block a user