malkhut(wire): OrderType unified — 5-layer taxonomy, backward compatible

state.py OrderType replaced with 5-layer taxonomy (FIX/CCXT aligned):
  Layer 1: MARKET, LIMIT (FIX Tag 40)
  Layer 2: GTC, IOC, FOK, GTD (FIX Tag 59)
  Layer 3: STOP_MARKET, STOP_LIMIT, TRIGGER_MARKET, TRIGGER_LIMIT, TRAILING_STOP
  Layer 4: POST_ONLY, REDUCE_ONLY, HIDDEN, ICEBERG (FIX Tag 18)
  Layer 5: OCO, TP_SL (exchange-specific)

action_menu.py: REDUCE_ONLY_MARKET → MARKET (reduce_only field handles it)

All 1126 tests pass. Fully wired and backward compatible.
This commit is contained in:
Codex
2026-07-14 13:04:54 +02:00
parent 369d9b41ad
commit 3324933613
2 changed files with 29 additions and 5 deletions

View File

@@ -121,7 +121,7 @@ def build_our_actions(
if _path_risk_says_exit(state, params):
actions.append(FulfilmentAction(
kind=ActionKind.FULL_EXIT, side=_exit_side_for_position(state),
order_type=OrderType.REDUCE_ONLY_MARKET, price_ticks_from_best=0,
order_type=OrderType.MARKET, price_ticks_from_best=0,
qty_fraction=1.0, ttl_ms=0, reduce_only=True,
metadata={"reason": "path_risk_exit"},
))